Re: [PATCH v2 02/16] refs: convert for_each_tag_ref to struct object_id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 23, 2015 at 03:27:23PM -0400, Jeff King wrote:
> +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

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]