Re: git merge <tag>: Spawning an editor can't be disabled
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:01
Jonathan Nieder [off-list ref] writes:
quoted
as of 1.7.9 merging in a tag unconditionally spawns an editor. I tried turning this of with --no-edit but to no avail. This is a behaviour change that breaks tools like git-buildpackage. I wonder if this should be turned off by default?Thanks. I can confirm this: ever since commit fab47d05 (merge: force edit and no-ff mode when merging a tag object, 2011-11-07), running "git checkout github/maint-1.5.6 && git merge --no-edit v1.7.2" launches an editor window despite the caller's request. And I agree that it is counter-intuitive.
Thanks; it is unquestionably a bug that "git merge --no-edit v1.7.2" spawns an editor. The real question is what should happen. If the editor is not spawned, there is no way for the user to review the result of signature verification before deciding to accept the merge. "git merge --no-edit v1.7.2" could error out saying "you cannot create this merge without reviewing". Or it could behave as if it was asked to "git merge --no-edit v1.7.2^0", dropping the signature verification and recording part altogether.