emacs-devel
[Top][All Lists]
Advanced

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

Re: Obscure error/warning/information message from git pull


From: Achim Gratz
Subject: Re: Obscure error/warning/information message from git pull
Date: Wed, 19 Nov 2014 13:14:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.51 (gnu/linux)

Alan Mackenzie writes:
>> Well, given the following history (time goes from left to right):
>
>>              - C - D <- foo
>>            / 
>> ... - A - B
>>            \
>>              - E - F <- bar
>
>
>> what branch commit A was made on, 'foo' or 'bar'?
>
> Quite clearly, A was committed on branch foo, since bar didn't exist at
> that time.

Neither foo nor bar might even have existed at the time commit A was
made (or even any of the other commits shown).

> Are you saying that at B, when bar is branched from foo, git discards
> all information about this branching, remembering only that there are two
> branches which are henceforth of fully equal status where before there
> was just one?

Again, the branch diagram tells you nothing about the sequence of
events.  Your assumption about when something branched off what seems to
be based on the sequence of labels A..F.  There are no such orderable
sequences.  E might have been created before F or after, but that is a
moot point now that the commits have been entered into the DAG in the
order E,F.

> If this is indeed the case, it is not surprising that git's abstraction
> of branching is so broken.

…or your expectation of what branches are is broken.  Branch foo
consists of a label pointing at commit D and everything reachable from D
is on that branch.  You can check the _local_ history of such labels in
the reflog, but they aren't kept around forever.  Git gives you a
guarantee that once you have D the DAG will always stay exactly the same
no matter what.  It doesn't care what branch label or how many are
pointing to D as long as D does not become dangling.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




reply via email to

[Prev in Thread] Current Thread [Next in Thread]