Re: git merge <tag>: Spawning an editor can't be disabled
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 9, 2012, 21:34 UTC
- Message-ID
- <7vliobvggu.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <7vpqdnvh3b.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Your approach is the right one, though. A patch for 1.7.9.1, on top of > b5c9f1c (merge: do not create a signed tag merge under --ff-only option, > 2012-02-05), would look like this, I think. > ...
I tweaked the message to credit your initial analysis and added the following test (again on top of b5c9f1c).
Thanks.
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh index a598dfa..9e27bbf 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