From: Pavel Roskin <proski@gnu.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: Default remote branch for local branch
Date: Fri, 31 Mar 2006 23:18:43 -0500 [thread overview]
Message-ID: <1143865123.14465.26.camel@dv> (raw)
In-Reply-To: <7vodzmngfp.fsf@assigned-by-dhcp.cox.net>
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
next prev parent reply other threads:[~2006-04-01 4:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-01 1:48 Default remote branch for local branch Pavel Roskin
2006-04-01 3:05 ` Junio C Hamano
2006-04-01 4:18 ` Pavel Roskin [this message]
2006-04-02 16:17 ` Josef Weidendorfer
2006-04-02 21:40 ` Junio C Hamano
2006-04-02 23:28 ` Josef Weidendorfer
2006-04-03 7:56 ` Andreas Ericsson
2006-04-03 9:38 ` Josef Weidendorfer
2006-04-03 10:03 ` Andreas Ericsson
2006-04-03 8:23 ` Junio C Hamano
2006-04-03 13:57 ` Josef Weidendorfer
2006-04-14 16:16 ` Petr Baudis
2006-04-14 18:26 ` Josef Weidendorfer
2006-04-01 5:38 ` Jakub Narebski
2006-04-01 19:57 ` Jakub Narebski
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=1143865123.14465.26.camel@dv \
--to=proski@gnu.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox