[Top][All Lists]

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

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

From: Teemu Likonen
Subject: Re: Obscure error/warning/information message from git pull
Date: Wed, 19 Nov 2014 06:48:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.51 (gnu/linux)

Alan Mackenzie [2014-11-18 22:43:26 +00:00] wrote:

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

No. "A" could have been committed on a private branch called
"asdfasdfasdf" by some unknown person. Then it may have been forget
various ways into that project's commit DAG. Branches are not places.
They just labels (sometimes temporary) that point to a commit. Nothing

Commit operation in Git is like PUSH:

    (defvar a (cons 'original nil))
    (defvar foo a)
    (defvar bar a)

    (push 'commit1 foo)
    (push 'commit2 foo)
    (push 'commit1 bar)
    (push 'commit2 bar)

Both "foo" and "bar" point to a single cons cell. They know nothing
about _variable_ "a" (i.e., branch label). The same applies for Git

Attachment: signature.asc
Description: PGP signature

reply via email to

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