X-Git-Url: https://git.mdrn.pl/fnpdjango.git/blobdiff_plain/c4ec253cd69546987dc20dec4c9be9e3867986f2..28fac547f6c8639b4c4edd66c895dacc7dff030e:/bin/git-archive-all.sh diff --git a/bin/git-archive-all.sh b/bin/git-archive-all.sh index 883c029..1f8b222 100755 --- a/bin/git-archive-all.sh +++ b/bin/git-archive-all.sh @@ -159,10 +159,13 @@ fi if [ $SEPARATE -eq 1 -a ! -d $OUT_FILE ]; then echo "When creating multiple archives, your destination must be a directory." echo "If it's not, you risk being surprised when your files are overwritten." - exit + exit 1 elif [ `git config -l | grep -q '^core\.bare=false'; echo $?` -ne 0 ]; then echo "$PROGRAM must be run from a git working copy (i.e., not a bare repository)." - exit + exit 1 +elif ! git rev-parse HEAD &> /dev/null; then + echo "You must have some commit in the git working copy." + exit 1 fi # Create the superproject's git-archive