Re: [PATCH 6/8] add ref_cmp_full_short() comparing full ref name with a short name
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- Oct 27, 2007, 22:16 UTC
- Message-ID
- <Pine.LNX.4.64.0710271811260.7345@iabervon.org>
- In-Reply-To
- <11935038084130-git-send-email-prohaska@zib.de>
On Sat, 27 Oct 2007, Steffen Prohaska wrote:
Show 9 quoted lines
> ref_cmp_full_short(full_name, short_name) expands short_name according > to the rules documented in git-rev-parse and compares the expanded > name with full_name. It reports a match by returning 0. > > This function makes the rules for resolving refs to sha1s available > for string comparison. Before this change, the rules were buried in > get_sha1*() and dwim_ref(). > > ref_cmp_full_short() will be used for matching refspecs in git-send-pack.
I think this and ref_matches_abbrev in remote.c should be both be named to be more explicit as to which sets of rules they implement, and should agree on order of arguments.
-Daniel *This .sig left intentionally blank*