From: Junio C Hamano Date: Mon, 12 Nov 2007 19:51:39 GMT Subject: Re: [PATCH 5/6] push: use same rules as git-rev-parse to resolve refspecs Message-ID: <7v1wav44z8.fsf@gitster.siamese.dyndns.org> In-Reply-To: <1194789709671-git-send-email-prohaska@zib.de> Steffen Prohaska writes: > diff --git a/remote.c b/remote.c > index bec2ba1..28d8eb7 100644 > --- a/remote.c > +++ b/remote.c > @@ -519,10 +519,7 @@ static int count_refspec_match(const char *pattern, > char *name = refs->name; > int namelen = strlen(name); > > - if (namelen < patlen || > - memcmp(name + namelen - patlen, pattern, patlen)) > - continue; > - if (namelen != patlen && name[namelen - patlen - 1] != '/') > + if (!ref_abbrev_matches_full_with_rules(pattern, name, ref_rev_parse_rules)) > continue; I vaguely recall that in the old round this check used to be without negation '!' in the front. I think this version is correct.