From: Michael J Gruber Date: Tue, 16 Aug 2011 13:37:33 GMT Subject: Re: [RFC] branch: list branches by single remote Message-ID: <4E4A729D.9030906@drmicha.warpmail.net> In-Reply-To: <20110804040646.GA5104@sigill.intra.peff.net> 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. Reminds me that I have to resurrect my patterns-with-branches series.... Michael