Re: [PATCH v2 01/10] technical doc: add a design doc for the evolve command
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Oct 12, 2022, 19:19 UTC
- Message-ID
- <37f56330-36c5-d333-0863-75e369d43d8d@dunelm.org.uk>
- In-Reply-To
- <0c7a87bc-f2b7-4c9e-cfe5-b4ba6b33fee7@github.com>
Hi Victoria
On 11/10/2022 17:59, Victoria Dye wrote:
Show 50 quoted lines
> Phillip Wood wrote: >> On 10/10/2022 20:35, Victoria Dye wrote: >>> Stefan Xenos via GitGitGadget wrote: >>> 3. Can't handle multiple changes sharing the same parent when the parent >>> needs to be rebased >>> - Since the introduction of '--update-refs' [1], this is technically >>> possible (although it needs a UI for the use case you mentioned). >> >> '--update-refs' is more limited though I think. With evolve if I have >> >> D (topic-2) >> / >> A - B - C (topic-1) >> \ >> E (topic-3) >> >> then if I checkout topic-1 and amend one of the commits I can run "git >> evolve" to automatically rebase topic-2 & topic-3. One cannot do that with >> "rebase --update-refs". We could extend rebase (or have a new command) so >> that users can say "amend commit X and rebase all the branches that contain >> it". > > Sorry, let me clarify what I mean. The 'update-ref' command in a > 'rebase-todo' script (not the '--update-refs' option) can be used to create > a rebase script that does what's described in your example: > > label onto # A > > reset onto > pick 1342ab B > fixup 8a7f3e fixup! B > label branch-point-1 > > pick 90d7fc C > label topic-1 > update-ref refs/heads/topic-1 > > reset branch-point-1 > pick 42f92b D > label topic-2 > update-ref refs/heads/topic-2 > > reset branch-point-1 > pick 06d8ec E > label topic-3 > update-ref refs/heads/topic-3 > > So, while it'd need a less manual UI (e.g., a 'rebase --evolve' option) to > generate that script, the 'update-ref' command makes this functionality > possible in a rebase.
Ah, I'd misunderstood what you meant, that makes sense - thanks for clarifying.
Best Wishes
Phillip