projects
/
matthijs
/
servers
/
drsnuggles.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git: Only create repositories for git-receive-pack.
[matthijs/servers/drsnuggles.git]
/
usr
/
local
/
bin
/
git-wrapper
diff --git
a/usr/local/bin/git-wrapper
b/usr/local/bin/git-wrapper
index cd8f7c1d4a11cc2ede3ddd724b7cbfab261a08b9..43da4e1d77b1086a0472bb8950f26f7d6496874f 100755
(executable)
--- a/
usr/local/bin/git-wrapper
+++ b/
usr/local/bin/git-wrapper
@@
-27,8
+27,9
@@
do
DIR="$BASE_PATH/$DIR"
fi
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"
mkdir "$DIR" &> /dev/null && (cd $DIR && git --bare init &> /dev/null)
fi
ARGS[$i]="$DIR"