From: Harald Nordgren Date: Fri, 26 Jun 2026 09:57:49 GMT Subject: Re: [PATCH v5 0/4] history: add squash subcommand to fold a range Message-ID: In-Reply-To: On Fri, Jun 26, 2026 at 10:53 AM Phillip Wood wrote: > > Hi Harald > > On 24/06/2026 22:54, Harald Nordgren via GitGitGadget wrote: > > Adds git history squash to fold a range of commits. > > It would be helpful to give a bit more detail here about the command so > that the reader has an overview of what is actually being implemented. > > - what does it do with fixup!, squash! and amend! commits? Can it use > the message from amend! commits to reword the commit? > - can the user reword the commit message? > - what happens if a merge commit inside the range has a parent outside > the range? > - what happens to branches that point to commits inside the range? > > I had a quick play and found that it accepts ranges that containing a > single commit (e.g. @^!) where there is nothing to squash. It also > accepts ranges that are not ancestors of HEAD (e.g. checkout master and > run "git history squash --dry-run origin/seen^2^!") without printing an > error message. Good points, I will take a look at clarifying or giving an error (like in the case of ancestor not in history of HEAD). Only accepting a single argument is quite limiting as one > cannot say > > git history squash ^:/base :/tip I don't understand why this is limiting? It thought it was clear that it should be one argument REF1..REF2 ? What does '^:/base :/tip' achieve that '^:/base..:/tip' cannot? Harald