From: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
To: Petr Baudis <pasky@suse.cz>
Cc: git@vger.kernel.org
Subject: Re: Default remote branch for local branch
Date: Fri, 14 Apr 2006 20:26:43 +0200 [thread overview]
Message-ID: <200604142026.44070.Josef.Weidendorfer@gmx.de> (raw)
In-Reply-To: <20060414161627.GA27689@pasky.or.cz>
On Friday 14 April 2006 18:16, you wrote:
> Dear diary, on Sun, Apr 02, 2006 at 06:17:29PM CEST, I got a letter
> where Josef Weidendorfer <Josef.Weidendorfer@gmx.de> said that...
> > > I would write the config like this:
> > >
> > > [branch-upstream]
> > > master = linus
> > > ata-irq-pio = irq-pio
> > > ata-pata = pata-drivers
> >
> > That is not working, as said above. But with above syntax extension,
> > with s/=/for/ it would be fine.
>
> I'm sorry but I'm slow and I don't see it - why wouldn't this work?
> (Except that the key name is case insensitive, which isn't too big a
> deal IMHO.)
Hmm...
* IMHO "keys are case insensitive" is enough to not qualify for branch
names: currently, branch names are case sensitive, and with above syntax you
effectively change this rule (you can not distinguish upstreams for "master"
vs. "MASTER").
* a dot currently seems to be allowed in branch names. For config keys, the
dot separates subkeys.
* I thought it is a convention for config keys to be alphanum only,
eg. "/" isn't allowed, too (which is mandatory for branch names).
Unfortunately, I found nothing about allowed chars for config keys in the
documentation.
> I for one think that the 'for'-syntax is insane - it's unreadable (your
> primary query is by far most likely to be "what's the upstream when on
> branch X", not "what branches is this upstream for"), would convolute
> the configuration file syntax unnecessarily and would possibly also
> complicate the git-repo-config interface.
As far as I remember, the "... for ..." syntax was suggested by Linus for the
proxy.command config a long time ago. The original proposal there was to
use an URL as key part (as far as I can remember).
That said,
> Pavel's syntax is much nicer.
... I agree with you here.
My suggestion would be to allow an optional syntax in the config file which is mapped
by git-repo-config to the normalized "... for ..."-scheme.
Eg. it should not be mandatory to specify "for ..." after the value of a key.
So instead of
branch.upstream = linus for master
you should be able to say
[branch]
upstream for master = linus
Josef
next prev parent reply other threads:[~2006-04-14 18:26 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
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 [this message]
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=200604142026.44070.Josef.Weidendorfer@gmx.de \
--to=josef.weidendorfer@gmx.de \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
/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