From: Jonathan Nieder Date: Tue, 17 Aug 2010 07:03:58 +0000 (-0500) Subject: merge script: refuse to merge during merge X-Git-Tag: v1.7.3-rc0~16^2~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6239af1c6c272eeb2b15359ff0dc25d769d5ac78;p=git.git merge script: refuse to merge during merge Check MERGE_HEAD and bail out if it exists. Based on v1.6.3.3~3^2 (refuse to merge during a merge, 2009-06-01). Without this change, the scripted merge does not pass t3030. Cc: Clemens Buchacher Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- diff --git a/contrib/examples/git-merge.sh b/contrib/examples/git-merge.sh index 99fe1f259..50042df1b 100755 --- a/contrib/examples/git-merge.sh +++ b/contrib/examples/git-merge.sh @@ -27,6 +27,9 @@ cd_to_toplevel test -z "$(git ls-files -u)" || die "Merge is not possible because you have unmerged files." +! test -e "$GIT_DIR/MERGE_HEAD" || + die 'You have not concluded your merge (MERGE_HEAD exists).' + LF=' '