Re: What actually is a branch?

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

 



On 08/07/2021 00:07, Sergey Organov wrote:
Felipe Contreras <felipe.contreras@xxxxxxxxx> writes:

This is works if your base (or tail, or whatever) is static, but many
branches jump around, and that's where @{tail} comes in handy.

Yeah, I see. When I need to make a branch jump around, I do need to
manually move my references, but that's fortunately very rare use-case
for me. Having direct support for that is still a win.


You can do this:

   git rebase --onto foo@{upstream} foo@{tail}

This will always rebase the right commits (no need to look into the
reflog). So you can say that the branch is foo@{tail}..foo.


Maybe I am missing something, is tail for tracking branches only, or for just any branch?

If for any branch, looking at

  A => B => C => D  master
       |
        \          / => G => H  branch_1
         => E => F
                   \ => I => J  branch_2

Where is the base of branch_1 and branch_2?
(and does it matter if they have an upstream)

Maybe branch_1 diverged from Master, and then branch_2 from branch_1?

Maybe the other way round.

Maybe there was a branch_0 (that got removed),
and branch_0 diverged from master, and branch_1 and branch_2 both from branch_0?

---
Also base may be misleading.

If head is the one end of the commit chains, then base should be the other.
But all branches contain commits A (and B). So the base would be A.

"fork" would be more descriptive IMHO?

Also, if that is to save the user from looking up fork points, maybe extend the syntax
  branch_1@{fork:branch_2}
  branch_1@{fork:master}

Depending on some of the answers to the above
  branch_1@{fork}
nearest fork, or upstream fork?



[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