Re: [PATCH v2 01/10] technical doc: add a design doc for the evolve command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Victoria

On 11/10/2022 17:59, Victoria Dye wrote:
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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux