From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-devel@gnu.org
Subject: Re: Obscure error/warning/information message from git pull
Date: Wed, 19 Nov 2014 16:24:25 +0100 [thread overview]
Message-ID: <87ioib8b86.fsf@Rainer.invalid> (raw)
In-Reply-To: 20141119135530.GA3986@acm.acm
Alan Mackenzie writes:
> OK, commit A might have been made on some other branch not in the
> diagram. But commit A was made before commit B (that is what these lines
> _mean_) and commit B was made before branch bar was created (and possibly
> before branch foo if that was branched of of B also, rather than being
> the continuation of the branch A was made on).
No, that's only what the published or local history looks like.
>> > 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.
>
> It must do. D is based on C is based on B, and F is based on E is based
> ob B, which in its turn is based on A. Commit D thus happened after C,
> etc. We have a partial ordering, not a total ordering though.
When that graph was constructed the objects must have been available in
that order. That doesn't mean they would have had to be created that
way.
>> 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, ....
>
> How can E have been created after F? That doesn't seem to make sense.
This is a distributed VCS. Somebody may have pushed E, then someone
else rebased his older F on top of that. You are looking at it in a
repo where that brach is called bar, but it may have come from a repo
where it was called something else. Again, your only guarantee is this:
if you look at some other repo at any point in time and have the SHA1
for the objects pointed to by foo and bar, provided they exist, then
you'll end up with the exact same DAG as what you have from foo and bar
in your repo right now.
>> but that is a moot point now that the commits have been entered into
>> the DAG in the order E,F.
>
> ??? A "commit" is the action of appending something onto a tip of the
> DAG. Commits do not somehow exist independently of a DAG and then get
> entered into it.
No, but there are multiple DAG, at least one in each of the existing
repos. In Git a commit is made immutable precisely by recording the
parent(s) and changing the parent -- moving the commit in the DAG --
changes it's SHA1, but unless there are conflicting edits the action of
the commit can be applied in many positions in each of the possible
versions of the DAG.
>> > 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.
>
> The very essence of a branch is its creation on the trunk (or other
> branch) and divergence from it. Its point of creation is essential -
> without it, it isn't a branch at all. It seems git simply discards this
> information.
No it's not. Let's assume that foo and bar are remote branches from
different repositories. In these repositories, there are no branches
and A is clearly reachable from the branch tips (probably called master)
in both repositories. But when I look at them in a single repository,
they have been diverging after B. So nobody has done this "very
essential" thing you talk about, yet clearly we have a branch point.
>> Branch foo consists of a label pointing at commit D and everything
>> reachable from D is on that branch.
>
> That is where git's abstraction is broken. A is reachable from branch
> bar, yet isn't on it and never has been - it's on the trunk, (or maybe
> branch foo).
That's your problem all along and it simply doesn't make any practical
sense in a dVCS. What if I later throw away foo and keep only bar?
Should that make A disappear? If A has created file a.el and none of
the commits ever changed it, is it not available in branch bar? Why
should I care that some developer thought foo was the trunk when
everyone else clearly has decided that for now it's bar?
Even nature disagrees with your view… If you cut the main branch from a
tree, one of the other branches will take its role. Depending on when
you do this it will be close to impossible to tell from the old tree
that the trunk has been a branch. So, nature and Git know a branch when
they see one, not when you first label it. It's an emergent feature and
not a designated one.
> The practical outcome is that git doesn't keep track of your branches.
> You've got to remember your branching structure (or write it on a piece
> of paper) if you ever want, say, to get a list of changes made on branch
> bar. This is something I would expect a VCS to do for me automatically.
> I think that is what the "..." in "master...bar" is all about.
Absolutely not. The purpose of three dots "..." is (and again, read the
documentation for gitrevisions) to show all commits that are reachable
from either master or bar, but not both. So it finds the branch point
and shows all commits on either side of that. In other words, if you
were to merge the two branches, then all the commits shown in the log
yould be reachable from the merged branch (and be part of either
branch).
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
next prev parent reply other threads:[~2014-11-19 15:24 UTC|newest]
Thread overview: 124+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 12:06 Obscure error/warning/information message from git pull Alan Mackenzie
2014-11-14 13:10 ` Tassilo Horn
2014-11-14 13:44 ` Andreas Schwab
2014-11-14 14:14 ` Andrew Burgess
2014-11-14 18:05 ` Alan Mackenzie
2014-11-14 18:58 ` Andreas Schwab
2014-11-14 20:09 ` Alan Mackenzie
2014-11-14 20:41 ` Christoph
2014-11-14 20:52 ` Andreas Schwab
2014-11-14 22:04 ` Alan Mackenzie
2014-11-15 7:28 ` Tassilo Horn
2014-11-15 19:40 ` Florian Weimer
2014-11-15 21:45 ` Alan Mackenzie
2014-11-15 22:02 ` Florian Weimer
2014-11-16 9:10 ` David Kastrup
2014-11-20 2:56 ` Rob Browning
2014-11-14 20:50 ` Tassilo Horn
2014-11-14 20:57 ` Sergey Organov
2014-11-14 21:27 ` Eli Zaretskii
2014-11-14 23:56 ` Michael Welsh Duggan
2014-11-15 7:36 ` David Kastrup
2014-11-14 23:02 ` Alan Mackenzie
2014-11-14 23:17 ` David Engster
2014-11-15 7:52 ` Eli Zaretskii
2014-11-15 8:18 ` David Engster
2014-11-15 8:54 ` Eli Zaretskii
2014-11-14 23:40 ` David Caldwell
2014-11-15 7:40 ` David Kastrup
2014-11-15 8:43 ` Eli Zaretskii
2014-11-15 9:12 ` David Kastrup
2014-11-15 9:53 ` Eli Zaretskii
2014-11-15 10:28 ` David Kastrup
2014-11-15 11:13 ` Eli Zaretskii
2014-11-15 14:30 ` David Kastrup
2014-11-15 17:56 ` Eli Zaretskii
2014-11-15 18:17 ` David Kastrup
2014-11-15 12:05 ` Alan Mackenzie
2014-11-15 14:35 ` David Kastrup
2014-11-15 15:57 ` Michael Welsh Duggan
2014-11-15 16:56 ` David Kastrup
2014-11-15 19:57 ` Alan Mackenzie
2014-11-15 20:48 ` Achim Gratz
2014-11-16 9:33 ` David Kastrup
2014-11-16 9:23 ` David Kastrup
2014-11-16 15:28 ` Eli Zaretskii
2014-11-16 15:47 ` David Kastrup
2014-11-16 13:25 ` Thien-Thi Nguyen
2014-11-16 15:26 ` Tassilo Horn
2014-11-16 15:35 ` Eli Zaretskii
2014-11-16 16:16 ` David Kastrup
2014-11-16 16:44 ` Andreas Schwab
2014-11-16 17:54 ` Eli Zaretskii
2014-11-16 20:24 ` Thien-Thi Nguyen
2014-11-17 11:54 ` Sergey Organov
2014-11-17 14:11 ` Alan Mackenzie
2014-11-18 16:59 ` Sergey Organov
2014-11-18 17:33 ` Eli Zaretskii
2014-11-18 17:58 ` Sergey Organov
2014-11-18 18:18 ` Eli Zaretskii
2014-11-18 18:40 ` David Kastrup
2014-11-18 18:53 ` Eli Zaretskii
2014-11-18 20:57 ` Sergey Organov
2014-11-18 22:43 ` Alan Mackenzie
2014-11-19 0:48 ` Barry Warsaw
2014-11-19 9:50 ` David Kastrup
2014-11-19 1:12 ` Yuri Khan
2014-11-19 16:18 ` Eli Zaretskii
2014-11-19 16:39 ` Sergey Organov
2014-11-19 16:49 ` Yuri Khan
2014-11-19 4:48 ` Teemu Likonen
2014-11-19 6:57 ` Stephen J. Turnbull
2014-11-19 13:55 ` Teemu Likonen
2014-11-19 8:22 ` Thien-Thi Nguyen
2014-11-19 12:14 ` Achim Gratz
2014-11-19 13:55 ` Alan Mackenzie
2014-11-19 15:00 ` David Kastrup
2014-11-19 15:15 ` Sergey Organov
2014-11-19 15:24 ` Achim Gratz [this message]
2014-11-19 15:36 ` David Kastrup
2014-11-19 16:00 ` Sergey Organov
2014-11-19 16:42 ` Stephen J. Turnbull
2014-11-20 0:57 ` Alexis
2014-11-20 15:52 ` Eli Zaretskii
2014-11-19 16:20 ` Eli Zaretskii
2014-11-19 16:36 ` Sergey Organov
2014-11-19 18:40 ` Stephen J. Turnbull
2014-11-19 18:48 ` Eli Zaretskii
2014-11-19 20:05 ` David Kastrup
2014-11-19 20:14 ` Eli Zaretskii
2014-11-20 3:01 ` Stephen J. Turnbull
2014-11-20 15:53 ` Eli Zaretskii
2014-11-19 18:29 ` Teemu Likonen
2014-11-18 23:07 ` Stephen J. Turnbull
2014-11-18 23:35 ` Alan Mackenzie
2014-11-19 1:31 ` Stephen J. Turnbull
2014-11-19 3:43 ` Eli Zaretskii
2014-11-18 21:59 ` John Yates
2014-11-19 3:47 ` Eli Zaretskii
2014-11-19 10:08 ` David Kastrup
2014-11-19 16:19 ` Eli Zaretskii
2014-11-18 22:59 ` Stephen J. Turnbull
2014-11-19 16:16 ` Eli Zaretskii
2014-11-19 16:48 ` Stephen J. Turnbull
2014-11-19 18:44 ` Eli Zaretskii
2014-11-14 21:04 ` David Kastrup
2014-11-14 13:46 ` Andreas Schwab
2014-11-14 13:59 ` Lars Magne Ingebrigtsen
2014-11-14 14:08 ` Tassilo Horn
2014-11-14 15:51 ` Andreas Schwab
2014-11-14 15:53 ` Lars Magne Ingebrigtsen
2014-11-14 20:41 ` Tassilo Horn
2014-11-14 20:52 ` Eli Zaretskii
2014-11-14 16:48 ` Eli Zaretskii
2014-11-14 14:38 ` Eli Zaretskii
2014-11-14 15:50 ` Andreas Schwab
2014-11-14 16:47 ` Eli Zaretskii
2014-11-14 17:03 ` Michael Welsh Duggan
2014-11-14 17:23 ` Eli Zaretskii
2014-11-14 17:30 ` Andreas Schwab
2014-11-14 20:30 ` Eli Zaretskii
2014-11-14 21:12 ` Andreas Schwab
2014-11-14 21:28 ` Eli Zaretskii
2014-11-14 21:18 ` David Kastrup
2014-11-14 21:35 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ioib8b86.fsf@Rainer.invalid \
--to=stromeko@nexgo.de \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).