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

2014-03-21 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: On Tue, Mar 18, 2014 at 9:18 PM, Quint Guvernator quintus.pub...@gmail.com 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

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 gits...@pobox.com wrote: Eric Sunshine sunsh...@sunshineco.com writes: On Tue, Mar 18, 2014 at 9:18 PM, Quint Guvernator quintus.pub...@gmail.com wrote: Another version, this time very in line with the review and commentary of Junio, Eric, and

[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 quintus.pub...@gmail.com --- builtin/apply.c| 4 ++--

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 quintus.pub...@gmail.com 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