Re: [PATCH] attr: add counted string version of git_attr()

2016-05-18 Thread Stefan Beller
On Wed, May 18, 2016 at 2:03 PM, Junio C Hamano wrote: > Often a potential caller has pair that > represents the name it wants to create an attribute out of. > > When name[namelen] is not NUL, the caller has to xmemdupz() > only to call git_attr(). > > Add git_attr_counted() that takes such a cou

[PATCH] attr: add counted string version of git_attr()

2016-05-18 Thread Junio C Hamano
Often a potential caller has pair that represents the name it wants to create an attribute out of. When name[namelen] is not NUL, the caller has to xmemdupz() only to call git_attr(). Add git_attr_counted() that takes such a counted string instead of "const char *name". Signed-off-by: Junio C H