git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Git user survey and `git pull`
@ 2006-09-21 16:24 Shawn Pearce
  2006-09-21 16:40 ` Petr Baudis
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Shawn Pearce @ 2006-09-21 16:24 UTC (permalink / raw)
  To: git

I just saw this comment under question 20:

    git-pull's behavior of merging in the first refspec to the
    current branch is very bad and has caused us serious repository
    issues in xorg.

Most of the folks I've been teaching Git to recently have found `git
fetch` to be a very counterintuitive command for fetching things.
Especially since `git push` is what's used to send changes to
the remote repository.  They also find `git pull . foo` as a
counterintuitive way to merge changes.

Basically I'm seeing users run `git pull` when they probably
should have run just `git fetch`; the pull obviously also merges
the first refspec in .git/remotes/origin to the current branch
and that's usually not what the user wanted, especially when the
upstream remote has several branches that the user may be tracking
(e.g. stable, dev, experimental).


I think its probably too late to change the UI[*1*] but I think
it is definately an issue for folks learning Git.  Calling push
push, fetch fetch and fetch+merge pull is probably a design flaw.
IMHO it probably should have been something like:

  Current            Shoulda Been
  ---------------    ----------------
  git-push           git-push
  git-fetch          git-pull
  git-pull . foo     git-merge foo
  git-pull           git-pull --merge
  git-merge          git-merge-driver

in other words pull does the download and doesn't automatically
start a merge unless --merge was also given and git-merge is a
cleaner wrapper around the Grand Unified Merge Driver that makes
it easier to start a merge.


[*1*] I bet a lot of scripts are currently based on the core
      Git Poreclain level functions.  I try to avoid them myself
      in scripts and go right to the plumbing but not everyone
      does that.

-- 
Shawn.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2006-09-23 14:12 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-21 16:24 Git user survey and `git pull` Shawn Pearce
2006-09-21 16:40 ` Petr Baudis
2006-09-21 17:38   ` Linus Torvalds
2006-09-21 18:05     ` Nicolas Pitre
2006-09-22  4:57     ` Junio C Hamano
2006-09-22 10:34       ` Santi
2006-09-22 19:08         ` Junio C Hamano
2006-09-22 23:24           ` Santi
2006-09-21 17:02 ` Nicolas Pitre
2006-09-21 17:09   ` Shawn Pearce
2006-09-21 17:12   ` Johannes Schindelin
2006-09-21 17:17   ` Jakub Narebski
2006-09-22 21:05 ` Matthias Urlichs
2006-09-23 11:51   ` Alan Chandler
2006-09-23 14:12   ` Johannes Schindelin
2006-09-23  8:54 ` Jakub Narebski

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