Re: [PATCH 4/5] Add --remote option to send-pack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 4 May 2007, Junio C Hamano wrote:

> Daniel Barkalow <barkalow@xxxxxxxxxxxx> writes:
> 
> > Is this actually supported in config files? At least for pulls, the "tag 
> > <tag>" notation is only available on the command line, afaict.
> 
> That is the only difference as far as I remember.  But you are
> right in that the set of refspecs allowed on the command line
> does not have to coincide with the ones in remotes file or the
> config (the latter two should match, though), and the latter may
> not be documented (the intention was to match all of them so the
> quoted documentation was enough, but having "tag <tag>" in
> config does not make sense).  Documentation/config.txt could use
> a bit of updates.  Hint, hint.

Once I've figured out what the intended behavior is, and have a canonical 
implementation so that it clearly does that, I'll document it. Until then, 
it's a bit tricky. :)

> > I think that having "<ref>:" or "<ref>" in a config file fetch 
> > line would be really bad; these refs would always be merged into any 
> > current head (without any remote tracking) when the remote is fetched 
> > from?
> 
> It's not bad at all.  Why people are so eager to _force_
> tracking on other people, I do not understand.
> 
> I had a moral equivalent of this in .git/remotes/origin (back
> then .git/config did not exist) when I was a contributor:
> 
> 	[remote "origin"]
>         	url = git.kernel.org:/pub/scm/git/git.git/
>                 fetch = refs/heads/master
> 
> If the user does not want to track, he does not have to.

Wouldn't it be better to to this as:

[remote "origin"]
	url = git.kernel.org:/pub/scm/git/git.git/
[branch "master"]
	remote = origin
	merge = refs/heads/master

If you're not tracking, the only thing you do with remote refs is merge 
them (after getting an anonymous temporary copy, of course), which should 
be the "merge" line, not the "fetch" line. Furthermore, you certainly 
don't want to merge refs/heads/master if you fetch (or pull) when you have 
todo (or a branch derived from it) checked out.

Merging without tracking is fine, in general; the "without tracking" was 
intentionally parenthetical. I just don't think always merging a 
particular remote head into the current branch, regardless of what branch 
is current, is a good idea.

	-Daniel
*This .sig left intentionally blank*
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]