Re: Default remote branch for local branch

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

 



Hello, Junio!

On Fri, 2006-03-31 at 19:05 -0800, Junio C Hamano wrote:
>  - Multiple subsystem maintainer trees tracked in the same local
>    repository.  Most generally, two local branches per each
>    remote head can be used (one tracking branch to fetch into,
>    another to build your changes based on it).  Alternatively,
>    you can use one local branch per each remote head without
>    using any tracking branch.
> 
> Your proposal to give default branch to pull from per the local
> branch would help only the last case.

Exactly.  I tried to track the main Linus repository and Jeff Garzik's
netdev in one place.  Then I discovered that my repository if full of
unintended merges made by "stg pull".

> The first one you do not
> switch between local branches at all and pull from many
> different places; the second is to merge from different topic
> branches from time to time and does not benefit from fixed
> configuration; the third does not even need configuration.
> 
> Maybe you would want something like this.
>
> In $GIT_DIR/config:
> 
> 	[pull]
> 	origin = linus for master
>         origin = irq-pio of libata for ata-irq-pio
>         origin = pata-drivers of libata for ata-pata

First of all, using "origin" on every line carries to little
information.

Secondly, I think the relationship should be between a local development
branch and a local tracking branch.  After all, all remote data is
placed on a local tracking branch first.  It's better not to jump over
layers of abstraction.  Suppose I want to update "masterB".  I tell git
to sync "originB" first.  git already has rules what to do if it should
sync "originB".  Let's not supersede those rules.

I would write the config like this:

[branch-upstream]
master = linus
ata-irq-pio = irq-pio
ata-pata = pata-drivers

> While we are on the topic, it _might_ be worthwhile to think
> about revamping the syntax of $GIT_DIR/remotes file, maybe even
> breaking backward compatibility.  The Pull: lines can be
> independently specified which gives flexibility, but I suspect
> local tracking branches from the same remote tend to live in the
> same place; IOW, you would probably not do something like:
> 
> 	URL: git://git.kernel.org/.../jgarzik/libata-dev.git
> 	Pull: refs/heads/irq-pio:refs/remotes/libata/irq-pio
> 	Pull: refs/heads/pata-drivers:refs/heads/pata-drivers
> 
> in practice.

Sorry, I don't understand this part.

-- 
Regards,
Pavel Roskin

-
: 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]