all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: git apologia [was: git pull fails with merge conflicts. ...]
Date: Sun, 16 Nov 2014 01:25:30 +0900	[thread overview]
Message-ID: <87vbmgv3b9.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <83sihkg2ds.fsf@gnu.org>

Eli Zaretskii writes:

 > I think we have different notions of "semantics", see below.
 > 
 > >                 commit ~ cons (object), tree ~ array of tree-or-blob,
 > > blob ~ atom, ref ~ list-valued symbol, branch = ref where the commit
 > > command has push (cl-macro) semantics, tag = ref where the commit
 > > command has cons (primitive function) semantics.  Everything else
 > > follows from list-traversing semantics, rather than the array
 > > reference semantics that svn and bzr provide with refnos.  Only merges
 > > ("cons with multiple parents") fail to follow the pattern, but I've
 > > never heard anyone complain that merges are particularly hard to
 > > understand.[1]
 > > 
 > > What's so hard about list semantics for an Emacs developer?
 > 
 > First, your list of primitive objects is already an obstacle: it's too
 > long,

It's *all* of the ones that matter.  You can ignore the internal
structure of trees.  And only "ref" is primitive, "tag" and "branch"
are derived from "ref".

But most important, as an Emacs developer, you understand how conses
work, and how to manipulate a Lisp list using car and cdr and push.
So you don't need to study "git semantics" *at all*, because you
already have a wealth of experience with them, once you grasp the
(very accurate) analogy.

 > As a user of a VCS, I care about commits, branches, and merges, and
 > my notion of a "tree" is just what I see in the file system.  I
 > don't want to know about anything else,

[...]
 > Second, too many things in Git are different, or are done differently,
 > or have different effect from their namesakes in other VCSes
 > (a.k.a. "have different semantics".

"<program> <command> has different semantics" is not what I understand
when someone says "I don't understand <program>'s semantics."

But OK, yes, that's an issue users would (justifiably) rather not deal
with.  If that's all you meant by "don't understand git semantics",
you have my sympathy, but I think the majority of Emacs developers are
going to be very pleased by the efficiency and power of git, and even
you may find after a few months that vc and/or magit have improved to
the point where you don't have to deal with git CLI at all any more.

A few random comments:

 > The result is that I'm not even sure I figured out the "@~n..@~m"
 > spec correctly (did I?).

You did.

 > The other result is that to see the diffs of the last commit, it is
 > much easier to use "git show" than the more obvious "git diff".

"git diff <commit>" has historical, and useful, semantics.  IMHO,
"git show <commit>" is a surprisingly elegant UI for what it does,
considering that this is git. :-)

Sure, they *could* have implemented "git diff -c" as hg and bzr do,
but I like "git show" better.  YMMV.

 > > Granted, submodules *are* hard; it's not just that tree is
 > > generalized to array of tree-or-blob-or-commit, but that commits
 > > also change semantics when used in submodules.  But we're not
 > > talking about submodules in Emacs yet.
 > 
 > I think we are, in the ELPA related discussions.  But maybe I'm
 > confused about that, too.

Ah, you're not confused.  There's been hot air vaporing about.  But I
don't think anybody who matters (= Stefan) is serious about it yet.

And rightly so.  The semantics of submodules are very subtle.  We use
hg subrepos in the XEmacs package repository, and it's a continuing
source of issues.  It's quite manageable, but mostly because we're a
very tight[1] community, and have a single package release manager
responsible for curating them.  I would expect much more trouble, at
least initially, in ELPA, because of the number and variety of package
maintainers, and individual maintainers in ELPA are responsible for
some things that Norbert takes care of for all XEmacs packages.

Footnotes: 
[1]  Read "small", but don't tell anyone I said that. :-)




  parent reply	other threads:[~2014-11-15 16:25 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-14 18:37 git pull fails with merge conflicts. How can this possibly happen? Alan Mackenzie
2014-11-14 19:01 ` David Caldwell
2014-11-14 21:54   ` Alan Mackenzie
2014-11-15  5:41     ` Yuri Khan
2014-11-15  8:14       ` Eli Zaretskii
2014-11-15  9:20         ` Stephen J. Turnbull
2014-11-15 10:54           ` Eli Zaretskii
2014-11-15 11:15             ` David Engster
2014-11-15 11:19             ` David Kastrup
2014-11-15 11:30               ` Eli Zaretskii
2014-11-15 14:38                 ` David Kastrup
2014-11-15 16:21                   ` Eli Zaretskii
2014-11-15 16:31               ` Stephen J. Turnbull
2014-11-15 16:55                 ` Eli Zaretskii
2014-11-15 17:05                   ` David Kastrup
2014-11-15 17:03                 ` David Kastrup
2014-11-15 18:25                   ` Stephen J. Turnbull
2014-11-15 16:25             ` Stephen J. Turnbull [this message]
2014-11-15 16:51               ` git apologia [was: git pull fails with merge conflicts. ...] Eli Zaretskii
2014-11-15 18:16                 ` Stephen J. Turnbull
2014-11-15 18:41                   ` David Kastrup
2014-11-15 19:13                   ` Git's victory and an entertaining irony Eric S. Raymond
2014-11-16  0:04                     ` Stephen J. Turnbull
2014-11-16  6:00                       ` Eric S. Raymond
2014-11-15 18:26                 ` git apologia [was: git pull fails with merge conflicts. ...] Andreas Schwab
2014-11-15 18:37                   ` Eli Zaretskii
2014-11-15 18:47                     ` David Kastrup
2014-11-16 16:06               ` git apologia Eli Zaretskii
2014-11-16 16:36                 ` Andreas Schwab
2014-11-16 18:04                   ` Eli Zaretskii
2014-11-16 18:20                     ` Andreas Schwab
2014-11-16 18:38                       ` Eli Zaretskii
2014-11-16 18:50                         ` Andreas Schwab
2014-11-16 18:58                           ` Eli Zaretskii
2014-11-16 18:55                         ` Teemu Likonen
2014-11-17  0:14                 ` Stephen J. Turnbull
2014-11-17 16:41                   ` Eli Zaretskii
2014-11-17 16:50                     ` Andreas Schwab
2014-11-17 17:47                       ` Eli Zaretskii
2014-11-17 16:57                     ` David Kastrup
2014-11-17 18:55                     ` Achim Gratz
2014-11-18  1:16                       ` Yuri Khan
2014-11-18  8:58                     ` Thien-Thi Nguyen
2014-11-18 13:53                       ` John Yates
2014-11-18 19:45                         ` Thien-Thi Nguyen
2014-11-18  9:39                     ` Andreas Schwab
2014-11-18 16:42                       ` Barry Warsaw
2014-11-17 12:38             ` git pull fails with merge conflicts. How can this possibly happen? Sergey Organov
2014-11-17 16:05               ` Eli Zaretskii
2014-11-17 16:54                 ` David Kastrup
2014-11-17 21:09                 ` Sergey Organov
2014-11-18  3:29                 ` Glenn Morris
2014-11-18 22:57                   ` Alan Mackenzie
2014-11-15 10:56           ` David Kastrup
2014-11-15 13:43             ` Stephen J. Turnbull

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vbmgv3b9.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=eliz@gnu.org \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.