зеркало из https://github.com/microsoft/git.git
repack -A -d: use --keep-unreachable when repacking
This is a safer variant of "repack -a -d" that does not drop unreachable objects that are in packs. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
08cdfb1337
Коммит
65aa53029a
|
@ -3,17 +3,19 @@
|
||||||
# Copyright (c) 2005 Linus Torvalds
|
# Copyright (c) 2005 Linus Torvalds
|
||||||
#
|
#
|
||||||
|
|
||||||
USAGE='[-a] [-d] [-f] [-l] [-n] [-q] [--max-pack-size=N] [--window=N] [--window-memory=N] [--depth=N]'
|
USAGE='[-a|-A] [-d] [-f] [-l] [-n] [-q] [--max-pack-size=N] [--window=N] [--window-memory=N] [--depth=N]'
|
||||||
SUBDIRECTORY_OK='Yes'
|
SUBDIRECTORY_OK='Yes'
|
||||||
. git-sh-setup
|
. git-sh-setup
|
||||||
|
|
||||||
no_update_info= all_into_one= remove_redundant=
|
no_update_info= all_into_one= remove_redundant= keep_unreachable=
|
||||||
local= quiet= no_reuse= extra=
|
local= quiet= no_reuse= extra=
|
||||||
while case "$#" in 0) break ;; esac
|
while case "$#" in 0) break ;; esac
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-n) no_update_info=t ;;
|
-n) no_update_info=t ;;
|
||||||
-a) all_into_one=t ;;
|
-a) all_into_one=t ;;
|
||||||
|
-A) all_into_one=t
|
||||||
|
keep_unreachable=--keep-unreachable ;;
|
||||||
-d) remove_redundant=t ;;
|
-d) remove_redundant=t ;;
|
||||||
-q) quiet=-q ;;
|
-q) quiet=-q ;;
|
||||||
-f) no_reuse=--no-reuse-object ;;
|
-f) no_reuse=--no-reuse-object ;;
|
||||||
|
@ -59,7 +61,13 @@ case ",$all_into_one," in
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
[ -z "$args" ] && args='--unpacked --incremental'
|
if test -z "$args"
|
||||||
|
then
|
||||||
|
args='--unpacked --incremental'
|
||||||
|
elif test -n "$keep_unreachable"
|
||||||
|
then
|
||||||
|
args="$args $keep_unreachable"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче