X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=usr%2Flocal%2Fbin%2Fgit-wrapper;fp=usr%2Flocal%2Fbin%2Fgit-wrapper;h=43da4e1d77b1086a0472bb8950f26f7d6496874f;hb=3b28063ff56df163bced9bb9c0baf4b9b608e1eb;hp=cd8f7c1d4a11cc2ede3ddd724b7cbfab261a08b9;hpb=72f5c5eeda71df1ed0efd64a752f004862ac59ab;p=matthijs%2Fservers%2Fdrsnuggles.git diff --git a/usr/local/bin/git-wrapper b/usr/local/bin/git-wrapper index cd8f7c1..43da4e1 100755 --- a/usr/local/bin/git-wrapper +++ b/usr/local/bin/git-wrapper @@ -27,8 +27,9 @@ do DIR="$BASE_PATH/$DIR" fi - # Create the git repository if it does not exist yet - if [ ! -e "$DIR" ]; then + # When the client wants us to receive a pack, create the git + # repository if it does not exist yet + if [ "`basename $0`" = "git-receive-pack" -a ! -e "$DIR" ]; then mkdir "$DIR" &> /dev/null && (cd $DIR && git --bare init &> /dev/null) fi ARGS[$i]="$DIR"