summaryrefslogtreecommitdiff
path: root/contrib/examples/git-merge.sh
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-08-17 07:03:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-18 21:02:04 (GMT)
commit6239af1c6c272eeb2b15359ff0dc25d769d5ac78 (patch)
treec0594bd0c181a7091dadb6f281007afc0814f279 /contrib/examples/git-merge.sh
parent64048d670b4810125493ff0a2bab88cb12344e7f (diff)
downloadgit-6239af1c6c272eeb2b15359ff0dc25d769d5ac78.zip
git-6239af1c6c272eeb2b15359ff0dc25d769d5ac78.tar.gz
git-6239af1c6c272eeb2b15359ff0dc25d769d5ac78.tar.bz2
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 <drizzd@aon.at> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/examples/git-merge.sh')
-rwxr-xr-xcontrib/examples/git-merge.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/examples/git-merge.sh b/contrib/examples/git-merge.sh
index 99fe1f2..50042df 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='
'