All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wesley J. Landaker" <wjl@icecavern.net>
To: Thomas Rast <trast@student.ethz.ch>
Cc: git@vger.kernel.org, "Björn Steinbrink" <B.Steinbrink@gmx.de>
Subject: Re: [RFC] pull/fetch rename
Date: Tue, 20 Oct 2009 13:59:30 -0600	[thread overview]
Message-ID: <200910201359.30880.wjl@icecavern.net> (raw)
In-Reply-To: <200910201947.50423.trast@student.ethz.ch>

On Tuesday 20 October 2009 11:47:45 Thomas Rast wrote:
> Especially on IRC, we see many people who are some combination of
> misunderstanding, misusing or overusing git-pull.  I figure this is
> the result of several factors, notably
> 
> a) pull/push are not symmetric,
> 
> b) guides/tutorials recommend pull for situations where they
>    shouldn't,
> 
> c) people blindly fire commands at git.

This may be minor, but also:

d) in mercurial, pull/push are symmetric, but fetch means pull+merge

> As you probably guessed by now, here is an idea for a very aggressive
> transition plan to address (a) in four phases:

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.
  
> 1. git-fetch gets options --merge/-m and --rebase that make it behave
>    like (current) git-pull, but requiring explicit arguments.
>    git-pull gets a new option --merge (-m) that only enforces presence
>    of arguments.
> 
> 2. git-pull refuses to do any work unless given either --merge or
>    --rebase.  Deprecation warnings for this start at the same time as
>    (1.).
>
> 3. git-pull becomes a synonym for git-fetch.
> 
> 4. git-fetch gives deprecation warnings that point the user to
>    git-pull instead.

Hmmm, maybe this would be better for easier transition; replace 2-4 above 
with:

2. git-pull learns --merge and gets a configuration option that allows 
turning auto-merging off (e.g. pull.merge = merge/yes (default), rebase, or 
no). This doesn't change any behavior by default, but allows individual 
users to essentially make pull == fetch, and is forward compatible with 
changes up to #4.

3. git-pull gives a deprecation warning if the configuration option is not 
set, but otherwise defaults to merge. To get rid of the warning, you can set 
it explicitly (one way or another).

4. The configuration option default changes to "no", and a helpful message 
is printed telling you that you can set the configuration option to merge to 
get the old behavior.

5. Drop deprecation messages. At this point, git fetch and git pull are 
identical, except git fetch never merges, regardless of the pull 
configuration setting.

This has a few nice properties:

  * There is lots and lots of warning; this transition could happen slowly.

  * Early on, it will be possible to make git pull have symmetric behavior 
by default, which is the desired endgame.

  * In the end, people who want "git pull" to always keep it's current 
behavior can do so by setting the proper configuration variable.

  * git fetch doesn't need to be deprecated (but could be).

  reply	other threads:[~2009-10-20 19:59 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 [this message]
2009-10-20 21:46   ` Junio C Hamano
2009-10-20 22:53     ` Thomas Rast
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=200910201359.30880.wjl@icecavern.net \
    --to=wjl@icecavern.net \
    --cc=B.Steinbrink@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=trast@student.ethz.ch \
    /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 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.