git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C Hamano
Message 7 of 7 in “Re: git merge <tag>: Spawning an editor can't be disabled”
  1. Jonathan NiederFeb 9, 2012
  2. Junio C HamanoFeb 9, 2012
  3. Johannes SixtFeb 9, 2012
  4. Junio C HamanoFeb 9, 2012
  5. Jonathan NiederFeb 9, 2012
  6. Junio C HamanoFeb 9, 2012
  7. Junio C HamanoFeb 9, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.