Re: GIT 0.99.7d, and end of week status.

From: Petr Baudis <pasky@suse.cz>
Date: 2005-09-27 05:10:37
Dear diary, on Mon, Sep 26, 2005 at 01:46:13AM CEST, I got a letter
where Junio C Hamano <junkio@cox.net> told me that...
> Tom Prince <tom.prince@ualberta.net> writes:
> 
> >> When you already have a repository to track git.git, I would
> >> recommend to have something like this in .git/remote/origin:
> >>
> >>     URL: http://kernel.org/pub/scm/git/git.git
> >>     Pull: master:origin maint:maint +pu:pu
> >>
> >
> > A warning when you do this. If you say 
> >
> >   git pull origin
> >
> > then your master will be updated with an octopus merge of the three heads.
> 
> Ahhhhhhhh.  That is true.  I always do "git fetch" and never do
> "git pull" against anything but a local repository, heads
> explicitly specified.  You are right.  The defaulting behaviour
> is incredibly broken.
> 
> Do people agree it is a good idea to change the "git pull
> origin" to mean "fetch all the default refs specified on Pull:
> lines, and merge only the first one into the current branch"?

I don't like that, the notion that you are fetching different stuff that
you are merging then seems quite confusing to me. But fetching just the
first revision will be confusing too. Either way, git-pull won't be
equivalent to git-fetch && git-merge (or git-resolve or whatever is the
core porcelain command) anymore. Well, the remotes stuff never got close
to my heart.

One alternative I can think of is, in case there are multiple heads,
require the user to explicitly specify the head he wants (origin#maint).
This comes from the idea that multi-head remotes are there really
primarily for fetching, not for pulling. There is also no potential for
confusion. In addition, there might another line "Default" in the remote
file, which could specify the default choice. It's just that choosing
the first one implicitly makes me a bit nervous and has potential for
bad mistakes. At least for Cogito, I would be reluctant to use it.

git-pull --merge-all or something to still do the octopus merge might be
useful in some cases (or as well might not - perhaps the best strategy
is to let whoever cares make a patch ;).

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Sep 27 05:11:32 2005

This archive was generated by hypermail 2.1.8 : 2005-09-27 05:11:35 EST