Re: ancestor and descendant ~ clarification needed

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

 



Xue Fuqiao <xfq.free@xxxxxxxxx> writes:

> In Documentation/user-manual.txt:
>
>    In the following, we say that commit X is "reachable" from commit Y
>    if commit X is an ancestor of commit Y.  Equivalently, you could say
>    that Y is a descendant of X, or that there is a chain of parents
>    leading from commit Y to commit X.
> [...]
>    However, if the current branch is a descendant of the other--so every
>    commit present in the one is already contained in the other--then Git
>    just performs a "fast-forward"; the head of the current branch is
>    moved forward to point at the head of the merged-in branch, without
>    any new commits being created.

Yeah, that is the other way around.

 (1) If the current branch is a descendant of the other--so every
     commit present in the other branch is already contained in the
     current branch--then merging the other branch into the current
     branch is a no-op "Already up-to-date!".

 (2) If the current branch is an ancestor of the other--so every
     commit present in the current branch is already contained in
     the other branch--then merging the other branch into the
     current branch can be fast-forwarded, by moving the tip of the
     current branch to point at the commit at the tip of the other
     branch, and by default Git does so, instead of creating an
     unnecessary merge.

--
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]