aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-02-09 13:30:52 -0800
committerJunio C Hamano <gitster@pobox.com>2012-02-09 13:30:52 -0800
commit3adab6f3a7793253b22a4a7aae34221d19e0236a (patch)
tree63edce038f0aa2a5256edb8a23810f562443f5e8 /t
parentb5c9f1c1b0ed9c91463b9f46a7c9dff3efc53773 (diff)
downloadgit-3adab6f3a7793253b22a4a7aae34221d19e0236a.tar.gz
git-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')
-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 a598dfa47..9e27bbf90 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