summaryrefslogtreecommitdiff
path: root/t/t7600-merge.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-02-09 13:30:52 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-02-09 13:30:52 -0800
commit3adab6f3a7793253b22a4a7aae34221d19e0236a (patch)
tree63edce038f0aa2a5256edb8a23810f562443f5e8 /t/t7600-merge.sh
parentmerge: do not create a signed tag merge under --ff-only option (diff)
downloadtgif-3adab6f3a7793253b22a4a7aae34221d19e0236a.tar.xz
merge: do not launch an editor on "--no-edit $tag"
When the user explicitly asked us not to, don't launch an editor. But do everything else the same way as the "edit" case, i.e. leave the comment with verification result in the log template and record the mergesig in the resulting merge commit for later inspection. Based on initiail analysis by Jonathan Nieder. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7600-merge.sh')
-rwxr-xr-xt/t7600-merge.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index a598dfa477..9e27bbf902 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -683,4 +683,16 @@ test_expect_success GPG 'merge --ff-only tag' '
test_cmp actual expect
'
+test_expect_success GPG 'merge --no-edit tag should skip editor' '
+ git reset --hard c0 &&
+ git commit --allow-empty -m "A newer commit" &&
+ git tag -f -s -m "A newer commit" signed &&
+ git reset --hard c0 &&
+
+ EDITOR=false git merge --no-edit signed &&
+ git rev-parse signed^0 >expect &&
+ git rev-parse HEAD^2 >actual &&
+ test_cmp actual expect
+'
+
test_done