Skip to content

Commit cb979a3

Browse files
author
Adrian Cornish
committed
Older version of git do not add core.bare=false
git version 1.7.11.3 does not have core.bare=false by default so change the test to look for core.bare=true instead as it is there in older and newer versions of git. modified: git-archive-all.sh
1 parent 87d42fe commit cb979a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-archive-all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ elif [ $SEPARATE -eq 1 -a ! -d "$OUT_FILE" ]; then
209209
echo "When creating multiple archives, your destination must be a directory."
210210
echo "If it's not, you risk being surprised when your files are overwritten."
211211
exit
212-
elif [ `git config -l | grep -q '^core\.bare=false'; echo $?` -ne 0 ]; then
212+
elif [ `git config -l | grep -q '^core\.bare=true'; echo $?` -eq 0 ]; then
213213
echo "$PROGRAM must be run from a git working copy (i.e., not a bare repository)."
214214
exit
215215
fi

0 commit comments

Comments
 (0)