aboutsummaryrefslogtreecommitdiff
path: root/contrib/examples
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-08-17 02:03:07 -0500
committerJunio C Hamano <gitster@pobox.com>2010-08-18 14:02:04 -0700
commit22e0560a70f4b5bfbbf571647e03fa154a6d6bd1 (patch)
tree24d958936314579dc1289bfec87a54020a7c0662 /contrib/examples
parent2102440c17f990fcb5c9269459c39c6312e80d1c (diff)
downloadgit-22e0560a70f4b5bfbbf571647e03fa154a6d6bd1.tar.gz
git-22e0560a70f4b5bfbbf571647e03fa154a6d6bd1.tar.xz
merge script: --squash, --ff from unborn branch are errors
Port v1.6.1-rc1~319 (provide more errors for the "merge into empty head" case, 2008-08-21) to the example merge script. Noticed by comparison with builtin merge. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/examples')
-rwxr-xr-xcontrib/examples/git-merge.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/examples/git-merge.sh b/contrib/examples/git-merge.sh
index 8f617fcb7..72853cf7f 100755
--- a/contrib/examples/git-merge.sh
+++ b/contrib/examples/git-merge.sh
@@ -245,6 +245,10 @@ then
exit 1
fi
+ test "$squash" != t ||
+ die "Squash commit into empty head not supported yet"
+ test "$allow_fast_forward" = t ||
+ die "Non-fast-forward into an empty head does not make sense"
rh=$(git rev-parse --verify "$1^0") ||
die "$1 - not something we can merge"