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

Best Practices with code/build fixes post-merge?

From
RDRobert Dailey <rcdailey.lists@gmail.com>
Date
May 16, 2016, 19:19 UTC
Message-ID
<CAHd499D7kgMtUXgBgsUzNLEMuuHRE7j_T1mikL21KJjDE8ey3A@mail.gmail.com>

Sometimes, I merge 2 branches that have deviated quite a bit. A worst-case example would be some API change. The topic branch (long-lived) may start using the old API. However, once I merge the topic back to master, that API no longer exists. As such, every place that introduces a usage of the old API will fail to build (but won't necessarily cause a conflict during a merge).

Concerning best practices, which of the following is better?
1. Make the fixes (which may be vast), smoke test, get a general feel
that everything is working on master again. Amend the changes to the
previous merge commit.
2. Make the fixes as in step 1, but instead of amending to the merge
commit, create a new descendant commit representing the changes.
Concerns I see with either choice:
1. Pros: Changes are atomic. Cons: merge commits are typically very
difficult to view, especially from logs. For example, `git log
--name-status` does nothing for merge commits, so it makes it
less-intuitive to get a good overview of changes.
2. Opposite of #1: Changes are not atomic (con), but it makes it very
clear that these changes were made "on top of" the merge (pro)

Is there a best practice here? What do each of you do as a personal preference or policy? Thanks in advance.

Next: Junio C Hamano
Message 1 of 2 in “Best Practices with code/build fixes post-merge?”
  1. Robert DaileyMay 16, 2016
  2. Junio C HamanoMay 16, 2016

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.