Re: [PATCH v2 02/16] refs: convert for_each_tag_ref to struct object_id
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Apr 24, 2015, 22:37 UTC
- Message-ID
- <20150424223747.GB322887@vauxhall.crustytoothpaste.net>
- In-Reply-To
- <20150423192723.GA29220@peff.net>
On Thu, Apr 23, 2015 at 03:27:23PM -0400, Jeff King wrote:
Show 18 quoted lines
> +static int do_for_each_ref(struct ref_cache *refs, const char *base,
> + each_ref_fn fn, int trim, int flags, void *cb_data)
> +{
> + return do_for_each_ref_generic(refs, base, fn, NULL, trim, flags, cb_data);
> +}
> +
> +static int do_for_each_ref_oid(struct ref_cache *refs, const char *base,
> + each_ref_fn_oid fn, int trim, int flags, void *cb_data)
> +{
> + return do_for_each_ref_generic(refs, base, NULL, fn, trim, flags, cb_data);
> +}
> +
> static int do_head_ref(const char *submodule, each_ref_fn fn, void *cb_data)
> {
> unsigned char sha1[20];
>
> You can even dispense with the _oid variant wrapper, and just call into
> the generic version directly from the new callsites.Sounds like a good idea. I'll reroll with that change probably sometime this weekend.
-- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187