Re: [PATCH 3/3] show-branch: use skip_prefix to drop magic numbers

2017-02-14 Thread Jeff King
On Wed, Feb 15, 2017 at 12:23:52AM +0530, Pranit Bauva wrote: > Did you purposely miss the one in line number 278 of > builtin/show-branch.c because I think you only touched up the parts > which were related to "refs/" but didn't explicitly mention it in the > commit message? > > if (starts_w

Re: [PATCH 3/3] show-branch: use skip_prefix to drop magic numbers

2017-02-14 Thread Pranit Bauva
Hey Peff, On Tue, Feb 14, 2017 at 10:58 PM, Jeff King wrote: > We make several starts_with() calls, only to advance > pointers. This is exactly what skip_prefix() is for, which > lets us avoid manually-counted magic numbers. > > Signed-off-by: Jeff King > --- > builtin/show-branch.c | 16 ++

[PATCH 3/3] show-branch: use skip_prefix to drop magic numbers

2017-02-14 Thread Jeff King
We make several starts_with() calls, only to advance pointers. This is exactly what skip_prefix() is for, which lets us avoid manually-counted magic numbers. Signed-off-by: Jeff King --- builtin/show-branch.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/bu