git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: git@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] Fix branches file configuration
Date: Wed, 26 Mar 2008 00:29:36 -0700	[thread overview]
Message-ID: <7v4paugcyn.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LNX.1.00.0803260240570.19665@iabervon.org> (Daniel Barkalow's message of "Wed, 26 Mar 2008 02:51:28 -0400 (EDT)")

Daniel Barkalow <barkalow@iabervon.org> writes:

> On Tue, 25 Mar 2008, Junio C Hamano wrote:
>
>> ...  I am reasonably sure about "fetching from $URL/bar"
>> part, but I am unsure about "store in foo/bar" part.
>> 
>> Any Cogito survivers out there who knows how this was supposed to have
>> worked?  We can go back and look at git-fetch.sh (in contrib/examples),
>> but I'd rather be lazy ;-)
>
> This code actually is from Linus, nearly 2 years ago, converting 
> git-push.sh; I then moved it from builtin-push.c to remote.c and later 
> added support to remote.c for the fetch side aspects while leaving that 
> part of the code alone. Of course, I didn't realize at any point that, as 
> a fetch configuration, a branches configuration ever stored things 
> anywhere, and it looks like it didn't with a slash. (See line 115 of 
> 755225de:git-parse-remote.sh)

Yeah, it slowly comes back to me.

I think the Penguin desire that triggered this mysterious syntax was
something like defining:

 $ echo >.git/branches/garzik git://git.kernel.org/pub/scm/linux/kernel/jgarzik

and being able to say:

 $ git fetch garzik/netdev-2.6 for-linus
 $ git fetch garzik/libata-dev master

> So I guess there should be:
>
>> >  	add_url_alias(remote, p);
>> > -	add_fetch_refspec(remote, branch);
>         if (!slash)
>> > +	strbuf_addf(&branch, ":refs/heads/%s", remote->name);
>> > +	add_fetch_refspec(remote, strbuf_detach(&branch, 0));
>> >  	remote->fetch_tags = 1; /* always auto-follow */
>> >  }

Yeah, sounds like it.  Will queue in 'next', for eventual inclusion in
'maint'.  This is a 1.5.4 regression fix, together with "push --tags" fix
we discussed today.

  reply	other threads:[~2008-03-26  7:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-25 23:35 [PATCH] Fix branches file configuration Daniel Barkalow
2008-03-25 23:50 ` Andrew Morton
2008-03-25 23:56 ` Junio C Hamano
2008-03-26  0:03   ` Andrew Morton
2008-03-26  6:51   ` Daniel Barkalow
2008-03-26  7:29     ` Junio C Hamano [this message]
2008-03-26  8:03       ` Junio C Hamano
2008-03-26  8:33 ` [PATCH] git-fetch test: test tracking fetch results, not just FETCH_HEAD Junio C Hamano

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=7v4paugcyn.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=akpm@linux-foundation.org \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).