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