Re: ancestor and descendant ~ clarification needed
- From
Xue Fuqiao <xfq.free@gmail.com>
- Date
- Oct 23, 2015, 07:29 UTC
- Message-ID
- <CAAF+z6H+wwCOhPCU-_Uh-Odc=411N+G+d_iE_AKX+JxVMDtsMQ@mail.gmail.com>
- In-Reply-To
- <xmqqfv12r6vn.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Fri, Oct 23, 2015 at 4:22 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> 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.
I see. Thank you. What do you think about the following minor patch for user-manual.txt? I can send a more formal one using format-patch and send-email if needed.
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index 1b7987e..d68df13 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -1431,11 +1431,11 @@ differently. Normally, a merge results in a merge commit, with two parents, one pointing at each of the two lines of development that were merged. -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. +However, 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 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. [[fixing-mistakes]] Fixing mistakes