Skip to content

Commit

Permalink
merge script: --squash, --ff from unborn branch are errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Aug 18, 2010
1 parent 2102440 commit 22e0560
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contrib/examples/git-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 22e0560

Please sign in to comment.