Show 21 quoted lines
> Jeff King venit, vidit, dixit 04.08.2011 06:06:
>> On Tue, Aug 02, 2011 at 07:17:38PM +0200, Michael Schubert wrote:
>>
>>> @@ -297,6 +298,9 @@ static int append_ref(const char *refname, const unsigned char *sha1, int flags,
>>> if ((kind & ref_list->kinds) == 0)
>>> return 0;
>>>
>>> + if (cb->remote && strncmp(cb->remote, refname, strlen(cb->remote)))
>>> + return 0;
>>> +
>>
>> This isn't right. You are assuming that a remote called "foo" will have
>> all of its branches in refs/remotes/foo. That's true under the default
>> configuration, but technically speaking, the remote tracking branches of
>> "foo" are defined by the right-hand side of foo's fetch refspecs.
>
> You are 100% right here, but...
>
>> So I think you want something more like this:
>
> ...the op still might want to filter simply by the remote name.
There's an interesting discussion related to the subject:
http://thread.gmane.org/gmane.comp.version-control.git/178960