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

Re: General question about "git range-diff"

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 2, 2023, 23:21 UTC
Message-ID
<xmqqbkcblp1y.fsf@gitster.g>
In-Reply-To
<PR3P195MB087847E68AD2032148EFCA039BA6A@PR3P195MB0878.EURP195.PROD.OUTLOOK.COM>
Robin Dos Anjos <robin_1997@hotmail.fr> writes:
> There are several workarounds to this situation.

It would be much better to avoid getting into a problematic situation in the first place than having to come up with a workaround for such a situation.

"git imerge" may be a good tool to know about for that. You may be able to avoid having to say: "Gaahh, I am not patient enough to rebase this series of commits, even though I spent time to carefully separate into logical and independent steps. I'll squash them all into one large blob of changes, even though it means I will lose all that work."

An "interdiff" that compares the base and the tip of the old and the new iterations is certainly a way to compare the changes as a whole, in exchange for loss of the diff between the log messages and other commit metadata. Adding such a mode to the "range-diff" command might not be a bad idea.

Previous: brian m. carlsonNext: Robin Dos Anjos
Message 3 of 4 in “General question about "git range-diff"”
  1. Robin Dos AnjosNov 2, 2023
  2. brian m. carlsonNov 2, 2023
  3. Junio C HamanoNov 2, 2023
  4. Robin Dos AnjosNov 3, 2023

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.