Re: [PATCH v3 0/4] history: add squash subcommand to fold a range
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 19, 2026, 16:11 UTC
- Message-ID
- <xmqqv7beldbu.fsf@gitster.g>
- In-Reply-To
- <ajU4JYYUTz5r-Xgc@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 16 quoted lines
> There are two more modes: > > - If a reference points at an intermediate commit then it stays there. > > - We detect this case and reject the update. Optionally, we may ask > the user what they intend to do with those other refs. > > It really is kind of ambiguous what is supposed to happen, and I can > think of different scenarios where each of the possibilities would be > the best choice. So ultimately, I think the last option is the best one, > as it also gives us a way to iterate. > > If so, a user would already be able to achieve that other refs keep > pointing at X by saying `git history squash --update-refs=head`. The > other modes can then be added at a later point in time as the need > arises.
Yeah, sounds like we should detect and fail this case, with advice() to use --update-refs.