Migrate git-repack.sh to use git-rev-parse --parseopt
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
e01fbf1a8f
commit
5715d0bb60
@ -3,7 +3,22 @@
|
|||||||
# Copyright (c) 2005 Linus Torvalds
|
# Copyright (c) 2005 Linus Torvalds
|
||||||
#
|
#
|
||||||
|
|
||||||
USAGE='[-a|-A] [-d] [-f] [-l] [-n] [-q] [--max-pack-size=N] [--window=N] [--window-memory=N] [--depth=N]'
|
OPTIONS_KEEPDASHDASH=
|
||||||
|
OPTIONS_SPEC="\
|
||||||
|
git-repack [options]
|
||||||
|
--
|
||||||
|
a pack everything in a single pack
|
||||||
|
A same as -a, and keep unreachable objects too
|
||||||
|
d remove redundant packs, and run git-prune-packed
|
||||||
|
f pass --no-reuse-delta to git-pack-objects
|
||||||
|
q,quiet be quiet
|
||||||
|
l pass --local to git-pack-objects
|
||||||
|
Packing constraints
|
||||||
|
window= size of the window used for delta compression
|
||||||
|
window-memory= same as the above, but limit memory size instead of entries count
|
||||||
|
depth= limits the maximum delta depth
|
||||||
|
max-pack-size= maximum size of each packfile
|
||||||
|
"
|
||||||
SUBDIRECTORY_OK='Yes'
|
SUBDIRECTORY_OK='Yes'
|
||||||
. git-sh-setup
|
. git-sh-setup
|
||||||
|
|
||||||
@ -20,10 +35,9 @@ do
|
|||||||
-q) quiet=-q ;;
|
-q) quiet=-q ;;
|
||||||
-f) no_reuse=--no-reuse-object ;;
|
-f) no_reuse=--no-reuse-object ;;
|
||||||
-l) local=--local ;;
|
-l) local=--local ;;
|
||||||
--max-pack-size=*) extra="$extra $1" ;;
|
--max-pack-size|--window|--window-memory|--depth)
|
||||||
--window=*) extra="$extra $1" ;;
|
extra="$extra $1=$2"; shift ;;
|
||||||
--window-memory=*) extra="$extra $1" ;;
|
--) shift; break;;
|
||||||
--depth=*) extra="$extra $1" ;;
|
|
||||||
*) usage ;;
|
*) usage ;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
|
Loading…
Reference in New Issue
Block a user