Re: [PATCH v5] use starts_with() instead of !memcmp()

2014-03-21 Thread Eric Sunshine
On Fri, Mar 21, 2014 at 12:53 PM, Junio C Hamano wrote: > Eric Sunshine writes: > >> On Tue, Mar 18, 2014 at 9:18 PM, Quint Guvernator >> wrote: >>> Another version, this time very in line with the review and commentary of >>> Junio, Eric, and Michael. This version boasts a revamped commit mess

Re: [PATCH v5] use starts_with() instead of !memcmp()

2014-03-21 Thread Junio C Hamano
Eric Sunshine writes: > On Tue, Mar 18, 2014 at 9:18 PM, Quint Guvernator > wrote: >> Another version, this time very in line with the review and commentary of >> Junio, Eric, and Michael. This version boasts a revamped commit message and >> fewer but surer hunks changed. > > Explaining what ch

Re: [PATCH v5] use starts_with() instead of !memcmp()

2014-03-18 Thread Eric Sunshine
On Tue, Mar 18, 2014 at 9:18 PM, Quint Guvernator wrote: > Another version, this time very in line with the review and commentary of > Junio, Eric, and Michael. This version boasts a revamped commit message and > fewer but surer hunks changed. Explaining what changed in this version is indeed a

[PATCH v5] use starts_with() instead of !memcmp()

2014-03-18 Thread Quint Guvernator
Another version, this time very in line with the review and commentary of Junio, Eric, and Michael. This version boasts a revamped commit message and fewer but surer hunks changed. Thanks again for the guidance. Quint Guvernator (1): use starts_with() instead of !memcmp() builtin/apply.c

[PATCH v5] use starts_with() instead of !memcmp()

2014-03-18 Thread Quint Guvernator
When checking if a string begins with a constant string, using starts_with() indicates the intention of the check more clearly and is less error-prone than calling !memcmp() with an explicit byte count. Signed-off-by: Quint Guvernator --- builtin/apply.c| 4 ++-- builtin/for-each-ref.c