2005-07-04 00:38:01 +04:00
|
|
|
#!/bin/sh
|
|
|
|
: ${GIT_DIR=.git}
|
|
|
|
: ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"}
|
2005-07-04 02:34:04 +04:00
|
|
|
rm -f .tmp-pack-*
|
|
|
|
packname=$(git-rev-list --unpacked --objects $(git-rev-parse --all) |
|
|
|
|
git-pack-objects --non-empty --incremental .tmp-pack) ||
|
2005-07-04 00:38:01 +04:00
|
|
|
exit 1
|
2005-07-04 02:34:04 +04:00
|
|
|
if [ -z "$packname" ]; then
|
2005-07-04 00:38:01 +04:00
|
|
|
echo Nothing new to pack
|
|
|
|
exit 0
|
|
|
|
fi
|
2005-07-04 02:34:04 +04:00
|
|
|
mv .tmp-pack-$packname.pack "$GIT_OBJECT_DIRECTORY/pack/pack-$packname.pack"
|
|
|
|
mv .tmp-pack-$packname.idx "$GIT_OBJECT_DIRECTORY/pack/pack-$packname.idx"
|