git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: Junio C Hamano <gitster@pobox.com>,
	"Wesley J. Landaker" <wjl@icecavern.net>
Cc: git@vger.kernel.org, "Björn Steinbrink" <B.Steinbrink@gmx.de>
Subject: Re: [RFC] pull/fetch rename
Date: Wed, 21 Oct 2009 00:53:28 +0200	[thread overview]
Message-ID: <200910210053.29794.trast@student.ethz.ch> (raw)
In-Reply-To: <7vpr8hlow9.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:
> "Wesley J. Landaker" <wjl@icecavern.net> writes:
> > d) in mercurial, pull/push are symmetric, but fetch means pull+merge

Ugh.  I can see how they arrived at hg-pull == git-fetch, but why on
earth was the logical next step hg-fetch == git-pull?!

</aside>

> > I would love to see this change, not because I get confused about pull/fetch 
> > (it honestly only took a few days to get used to), but because having 
> > push/pull be symmetric just is so much more conceptually pure / easier 
> > explain to co-workers / separation between orthogonal operations / 
> > satisfying to my inner perfectionist / etc.
> 
> Is making "pull" a symmetric opposite of "push" the ultimate goal?
> 
> Or is making (or rather "keeping") "pull" useful more important?
> 
> It is not even an attitude that values philosophy over utility.
> 
> Fundamentally, pull and push cannot be symmetric because nobody is sitting
> in front of the repository you are pushing into (that is what a "push" is;
> you push from outside the repository---otherwise you would be "pull"ing
> from inside it in the other direction), but you know you are sitting in
> the repository, ready to resolve potential conflicts, when you say "pull".

Well, I'd rather not argue the little semantic details, but I think
with the changes to disallow pushing into HEAD, push and fetch are as
symmetric as it gets.  Both are exactly and only about transmitting
refs with their associated commits to the other side.  Which one you
pick only depends on which side you sit on.

OTOH pull is about merging.  And we can repeat the "pull = fetch +
merge" mantra to ourselves all we like, having pull as "the opposite
of push" is conceptually much easier to understand and thus far easier
to explain to new users.

> And you are doing this for what gain?  The only thing I can think of is
> "People who deliberately set 'pull.merge = yes' can no longer blame us for
> pull not being the opposite of push."  I do not consider it as a gain.
> 
> I do not buy "People who set 'pull.merge = yes' now understand why pull
> touches their work tree, because they did it themselves" either.
[...]
> But I do not know what to say when people say "push cannot update the work
> tree, so let's make pull not to update the work tree by default---it will
> make it much less useful so we will fix that regression with yet another
> configuration option".

There would not be a configuration option.

Really, the whole goal would be to make pull the opposite of push.  No
exceptions, and most certainly no little loopholes to escape into the
merging behaviour by default.  The current 'git pull' behaviour would
either be obtained through a new command, or through an explicit
switch.

> I would be much more sympathetic if the suggested approach were to make
> "push" more symmetric to "pull", or at least attempt to allow it to be, by
> giving it an option to update the associated work tree when it can [*1*].
[...]
> *1* Obviously you cannot do this most of the time _if_ the work tree has
> an interactive user sitting in front of it, but in a repository that never
> allows a non-ff push, with a work tree that is never updated except by
> such a push, can reasonably be maintained to give an illusion of push
> being an opposite of pull by fast forwarding the work tree when the push
> updates HEAD.

Well, that reminds me of

  http://thread.gmane.org/gmane.comp.version-control.git/110251

but was not really what I was aiming at.

> It's not even funny.

It was an RFC, not a joke ;-)

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2009-10-20 22:54 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-20 17:47 [RFC] pull/fetch rename Thomas Rast
2009-10-20 19:59 ` Wesley J. Landaker
2009-10-20 21:46   ` Junio C Hamano
2009-10-20 22:53     ` Thomas Rast [this message]
2009-10-20 23:11       ` Junio C Hamano
2009-10-21  2:01         ` Wesley J. Landaker
2009-10-20 23:16       ` Junio C Hamano
2009-10-20 21:42 ` Nanako Shiraishi
2009-10-20 22:41   ` Thomas Rast
2009-10-20 23:56 ` Daniel Barkalow
2009-10-21  3:06   ` Björn Steinbrink
2009-10-21  4:22     ` Daniel Barkalow
2009-10-21 11:57       ` Björn Steinbrink
2009-10-21 17:12         ` Daniel Barkalow
2009-10-21  6:22     ` Junio C Hamano
2009-10-21 17:19       ` Clemens Buchacher
2009-10-21 17:21       ` [PATCH] modernize fetch/merge/pull examples Clemens Buchacher
2009-10-21 21:38         ` Junio C Hamano
2009-10-21 21:41           ` [RFC/PATCH] git-merge: forbid fast-forward and up-to-date when --no-commit is given Junio C Hamano
2009-10-22 10:21             ` Nanako Shiraishi
2009-10-22 22:26               ` Junio C Hamano
2009-10-21 21:46           ` [PATCH] git-merge: imply --no-ff " Junio C Hamano
2009-10-22  6:35             ` Clemens Buchacher
2009-10-22  8:51         ` [PATCH] modernize fetch/merge/pull examples Thomas Rast
2009-10-22  9:48       ` [RFC] pull/fetch rename Thomas Rast
2009-10-21  6:30   ` Mike Hommey
2009-10-21  6:33     ` Junio C Hamano
2009-10-21  7:06       ` Mike Hommey
2009-10-21  7:22       ` Junio C Hamano
2009-10-21  7:45         ` Jeff King
2009-10-21  7:47           ` Jeff King
2009-10-24  6:30           ` Junio C Hamano

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=200910210053.29794.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=B.Steinbrink@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=wjl@icecavern.net \
    /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.
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 NNTP newsgroup(s).