Thread (27 messages) 27 messages, 6 authors, 10h ago

Re: [PATCH v3 0/4] history: add squash subcommand to fold a range

From: Junio C Hamano <hidden>
Date: 2026-06-19 16:11:53

Patrick Steinhardt [off-list ref] writes:
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help