summaryrefslogtreecommitdiff
path: root/git-repack.sh
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2007-11-04 11:31:02 +0100
committerJunio C Hamano <gitster@pobox.com>2007-11-05 22:48:13 -0800
commit5715d0bb60dd90b03519cc436310f3cabe5b9b2a (patch)
tree55f1ba10cd29cafddb4597c4fa0e0ae0d96fb707 /git-repack.sh
parente01fbf1a8f185bf6722e828286862a4122269ef7 (diff)
downloadgit-5715d0bb60dd90b03519cc436310f3cabe5b9b2a.tar.gz
Migrate git-repack.sh to use git-rev-parse --parseopt
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-repack.sh')
-rwxr-xr-xgit-repack.sh24
1 files changed, 19 insertions, 5 deletions
diff --git a/git-repack.sh b/git-repack.sh
index 7220635c96..e18eb3f5dc 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -3,7 +3,22 @@
# 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'
. git-sh-setup
@@ -20,10 +35,9 @@ do
-q) quiet=-q ;;
-f) no_reuse=--no-reuse-object ;;
-l) local=--local ;;
- --max-pack-size=*) extra="$extra $1" ;;
- --window=*) extra="$extra $1" ;;
- --window-memory=*) extra="$extra $1" ;;
- --depth=*) extra="$extra $1" ;;
+ --max-pack-size|--window|--window-memory|--depth)
+ extra="$extra $1=$2"; shift ;;
+ --) shift; break;;
*) usage ;;
esac
shift