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>
Jonathan Nieder committed
Aug 17, 2010 at 02:03 UTC
22e0560a70f4b5bfbbf571647e03fa154a6d6bd1
1 file changed
+4
contrib/examples/git-merge.sh
+4
@@ -245,6 +245,10 @@ then
245
exit 1
246
fi
247
248
+ test "$squash" != t ||
249
+ die "Squash commit into empty head not supported yet"
250
+ test "$allow_fast_forward" = t ||
251
+ die "Non-fast-forward into an empty head does not make sense"
252
rh=$(git rev-parse --verify "$1^0") ||
253
die "$1 - not something we can merge"
254