GIT 0.99.3
[git/gitweb.git] / git-repack-script
blob15b7fd6a15de3a3a5df6a7408f65410c37c0589e
1 #!/bin/sh
2 . git-sh-setup-script || die "Not a git archive"
4 rm -f .tmp-pack-*
5 packname=$(git-rev-list --unpacked --objects $(git-rev-parse --all) |
6 git-pack-objects --non-empty --incremental .tmp-pack) ||
7 exit 1
8 if [ -z "$packname" ]; then
9 echo Nothing new to pack
10 exit 0
12 mkdir -p "$GIT_OBJECT_DIRECTORY/pack" &&
13 mv .tmp-pack-$packname.pack "$GIT_OBJECT_DIRECTORY/pack/pack-$packname.pack" &&
14 mv .tmp-pack-$packname.idx "$GIT_OBJECT_DIRECTORY/pack/pack-$packname.idx"