Re: [PATCH 1/2] fetch/push: allow refs/*:refs/*

2012-08-22 Thread Junio C Hamano
Junio C Hamano writes: > Michael Haggerty writes: > ... >> * The second branch of the if is *never* executed. > else if (args.fetch_all && >(!args.depth || prefixcmp(ref->name, "refs/tags/") )) { > *newtail = ref; >

Re: [PATCH 1/2] fetch/push: allow refs/*:refs/*

2012-08-22 Thread Junio C Hamano
Michael Haggerty writes: >> The remote side can also throw phony "I have this object, too, but >> not at a particular ref---this entry is only to let you know I have >> it, so that we can negotiate minimal transfer better" entries that >> are labelled with strings that do not begin with "refs/" a

Re: [PATCH 1/2] fetch/push: allow refs/*:refs/*

2012-08-22 Thread Michael Haggerty
On 08/21/2012 07:37 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >>> diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c >>> index 6207ecd..a3e3fa3 100644 >>> --- a/builtin/fetch-pack.c >>> +++ b/builtin/fetch-pack.c >>> @@ -546,7 +546,7 @@ static void filter_refs(struct ref **refs

Re: [PATCH 1/2] fetch/push: allow refs/*:refs/*

2012-08-21 Thread Junio C Hamano
Michael Haggerty writes: >> diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c >> index 6207ecd..a3e3fa3 100644 >> --- a/builtin/fetch-pack.c >> +++ b/builtin/fetch-pack.c >> @@ -546,7 +546,7 @@ static void filter_refs(struct ref **refs, int nr_match, >> char **match) >> for (ref = *r

Re: [PATCH 1/2] fetch/push: allow refs/*:refs/*

2012-08-20 Thread Michael Haggerty
On 08/20/2012 07:39 PM, Junio C Hamano wrote: > There are a handful of places where we call check_refname_format() on a > substring after "refs/" of a refname we are going to use, and filter out a > valid match with "refs/stash" with such a pathspec. Not sending a stash > may arguably be a feature

[PATCH 1/2] fetch/push: allow refs/*:refs/*

2012-08-20 Thread Junio C Hamano
There are a handful of places where we call check_refname_format() on a substring after "refs/" of a refname we are going to use, and filter out a valid match with "refs/stash" with such a pathspec. Not sending a stash may arguably be a feature (as stash is inherently a local workflow element), bu