From: Junio C Hamano Date: Fri, 26 Jun 2026 14:02:55 GMT Subject: Re: [PATCH v5 0/4] history: add squash subcommand to fold a range Message-ID: In-Reply-To: <4654a3f1-bf79-4c3f-b121-16bb3ab25f07@gmail.com> Phillip Wood writes: > On 26/06/2026 10:57, Harald Nordgren wrote: >> On Fri, Jun 26, 2026 at 10:53 AM Phillip Wood wrote:>> >> 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? > > '^/:base..:/tip' is not a range - everything after the first '/:' is > treated as a regular expression to search for. This particular case you can do HEAD^{/base}..HEAD^{/tip} (or even go "HEAD^{/tip}~43" and fancier other forms, the point being with matching {} pair, you can do more than what the lazy short-hand form can). But I think your point still stands, I think, as git history squash HEAD^{/base}..:/tip ^main may be something you would want to do to express additional constraints, like "I want this range squashed, but I should never ever touch what is already in main".