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

Redundant merges?

From
Sskillzero@gmail.com <skillzero@gmail.com>
Date
Sep 30, 2009, 21:15 UTC
Message-ID
<2729632a0909301415p7fe0da44l9453fca70bd523ca@mail.gmail.com>

Is there a way to avoid redundant merges when merging maint to master if both maint and master have already merged in the same topic branches? For example, assuming the git.git repository:

1. A bug was found and a topic branch (with a merge-base at or before
maint) is created with the fix.
2. The fix looks good so it's merged into master.
3. maint is already past the freeze date so the fix isn't merged into
maint (bug is not super critical).
4. maint is delayed for some reason and is accepting fixes.
5. Topic branch from step 1 is merged into maint.
6. maint is merged into master.

What I see is two merge commits that merge the same topic. I think I understand why it's doing this (the merge commit is just another commit so it merges it). But could it look at what the merge did and realize that it already has the commit that the merge commit merged and do nothing in this case?

Next: Jeff King
Message 1 of 2 in “Redundant merges?”
  1. skillzero@gmail.comSep 30, 2009
  2. Jeff KingOct 1, 2009

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.