Re: Finding the name of the parent branch?

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

 



2009/1/30 Pascal Obry <pascal@xxxxxxxx>:
> I want to find the name of the parent branch in a script. What is the best way?
>
>                         o---o---o---C
>                         /
>                    o---o---o---B
>                   /
>           ---o---o---o---o---o---A
>
> For B I want to get A and for C I want to get B.

I think your definition is not well defined. A, B and C are just
branches of you project, technically they are equivalent. Maybe you
are thinking that the common commits of, say A and B, really belongs
to A, but this is not the case they belong to both branches. In git a
branch is really just a pointer to a commit and by extension the
history, it is not a series of commits.

Just a counterexample, just rearranging you graph:

                        o---B
                        /
                   o---o---o---o---o---C
                  /
          ---o---o---o---o---o---A

>From you description: For B I would get C and for C I would get A.

HTH,
Santi
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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