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

Re: [PATCH v2] Teach merge the '[-e|--edit]' option

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 10, 2011, 07:05 UTC
Message-ID
<m3ehyl1g5v.fsf@localhost.localdomain>
In-Reply-To
<7vr52lo1m3.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> By the way, on the other side of this same coin lies another use case
> (different from the one in the footnote in the previous message) for
> "merge --no-commit". When you know that a particular merge _will_ need
> semantic adjustments, even if it were to textually merge cleanly, you
> would want the command to ask you for help to come up with the final tree,
> instead of trusting the clean automerge result. This often happens when
> the topic branch you are about to merge has changed the semantics of an
> existing function (e.g. adding a new parameter) while the branch you are
> on has added new callsite to the function (or the other way around). In
> such a merge, you would need to adjust the new callsite that does not know
> about the additional parameter to the new function signature.  For exactly
> the same reason, it is not a kosher advice to give to users of modern Git
> to "interfere with the merge with 'merge --no-commit', and then conclude
> with 'commit'", as 'commit' has less information than 'merge' itself what
> 'merge' wants to do in addition to recording the result as a 'commit'.

Yet another issue is if we should blindly trust automatic merge resolution. It is considered a good practice by some to always check (e.g. by compiling and possibly also running tests) the result of merge, whether it required merge conflict resolution or not.

IIRC Linus lately said that making "git merge" automatically commit was one of bad design decisions of git, for the above reason...

-- 
Jakub Narębski
Previous: Junio C HamanoNext: Matthieu Moy
Message 13 of 15 in “Teach merge the '[-e|--edit]' option”
  1. Teach merge the '[-e|--edit]' optionJay Soffian, Oct 7, 2011
  2. Junio C HamanoOct 7, 2011
  3. Jay SoffianOct 7, 2011
  4. Junio C HamanoOct 7, 2011
  5. Jay SoffianOct 7, 2011
  6. Jay SoffianOct 7, 2011
  7. Junio C HamanoOct 7, 2011
  8. Teach merge the '[-e|--edit]' optionJay Soffian, Oct 7, 2011
  9. Junio C HamanoOct 7, 2011
  10. Jay SoffianOct 8, 2011
  11. Junio C HamanoOct 9, 2011
  12. Junio C HamanoOct 10, 2011
  13. Jakub NarebskiOct 10, 2011
  14. Matthieu MoyOct 10, 2011
  15. Junio C HamanoOct 10, 2011

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.