aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-19 10:49:27 -0700
committerJunio C Hamano <gitster@pobox.com>2011-10-19 10:49:27 -0700
commit3dfbe68fc29248feea3a384e156497ca2463f932 (patch)
treea2681a7cd7fc4be97475709b775ee0024d45eeb5 /t
parent9b55aa03daebf43067021b7d58abea249229987b (diff)
parent66f4b98ad9a8218ad97b7b2f1604b205072dda62 (diff)
downloadgit-3dfbe68fc29248feea3a384e156497ca2463f932.tar.gz
git-3dfbe68fc29248feea3a384e156497ca2463f932.tar.xz
Merge branch 'js/merge-edit-option'
* js/merge-edit-option: Teach merge the '[-e|--edit]' option Conflicts: builtin/merge.c
Diffstat (limited to 't')
-rwxr-xr-xt/t7600-merge.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 87aac835a..3008e4e12 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -643,4 +643,27 @@ test_expect_success 'amending no-ff merge commit' '
test_debug 'git log --graph --decorate --oneline --all'
+cat >editor <<\EOF
+#!/bin/sh
+# Add a new message string that was not in the template
+(
+ echo "Merge work done on the side branch c1"
+ echo
+ cat <"$1"
+) >"$1.tmp" && mv "$1.tmp" "$1"
+# strip comments and blank lines from end of message
+sed -e '/^#/d' < "$1" | sed -e :a -e '/^\n*$/{$d;N;ba' -e '}' > expected
+EOF
+chmod 755 editor
+
+test_expect_success 'merge --no-ff --edit' '
+ git reset --hard c0 &&
+ EDITOR=./editor git merge --no-ff --edit c1 &&
+ verify_parents $c0 $c1 &&
+ git cat-file commit HEAD >raw &&
+ grep "work done on the side branch" raw &&
+ sed "1,/^$/d" >actual raw &&
+ test_cmp actual expected
+'
+
test_done