mirror of
https://github.com/git/git.git
synced 2024-11-29 21:15:15 +08:00
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>
This commit is contained in:
parent
2102440c17
commit
22e0560a70
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user