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

Re: General question about "git range-diff"

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Nov 2, 2023, 21:48 UTC
Message-ID
<ZUQZF-4CW-FbjfAU@tapette.crustytoothpaste.net>
In-Reply-To
<PR3P195MB087847E68AD2032148EFCA039BA6A@PR3P195MB0878.EURP195.PROD.OUTLOOK.COM>
On 2023-11-02 at 18:56:39, Robin Dos Anjos wrote:
> Hi git community!
Hi,
> I'm a bit intimidated as this is my first message in the mailing list but I'll give it a go!
No reason to be intimidated.  We're very friendly here.
Show 5 quoted lines
> This is so useful to me that I'm wondering why "git range-diff" does
> not implement this behavior. We could imagine a flag that would make
> it behave as I described. Is this something that was ever considered?
> Are there any technical difficulties that I'm completely missing? Do
> you think this could be helpful to other people?

I'm not the author of range-diff, but I believe it was based on an earlier tool named git-tbdiff[0], which had similar behaviour and similar limitations. My guess as to why nobody implemented a feature to handle the squashed commits case is that typically the recommended workflow in Git is to write small independent, logical, well-described, bisectable commits, and squashing is not recommended because it destroys all the work that people have put into making nice commits.

Of course, in many situations, people don't write nice commits like that, and many commits are effectively fixup commits with very short messages (e.g. "make it work"), sometimes containing profanity directed at the computer, and in those environments, squashing may be a legitimate choice. However, it isn't typically a workflow that gets a lot of focus because most tooling is focused on the more recommended approach.

Having said that, I'm sure people would find a feature like you suggested useful, although I'm not likely to use it myself. It's possible that somebody might see your message and implement it, but usually patches come in from people who feel strongly about a feature and implement it themselves. If you feel like you'd like to try such a change, I'm sure you can find folks to review it and provide feedback.

[0] https://github.com/trast/tbdiff
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
Previous: Robin Dos AnjosNext: Junio C Hamano
Message 2 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.