Re: [PATCH 03/12] Add and use skip_prefix_defval()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 18, 2013, 17:51 UTC
- Message-ID
- <xmqq38lqjbde.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20131218162746.GA15334@sl4mmy.zerosphere.org>
"Kent R. Spillner" <kspillner@acm.org> writes:
Show 12 quoted lines
> On Wed, Dec 18, 2013 at 09:53:48PM +0700, Nguyễn Thái Ngọc Duy wrote: >> This is a variant of skip_prefix() that returns a specied pointer >> instead of NULL if no prefix is found. It's helpful to simplify >> >> if (starts_with(foo, "bar")) >> foo += 3; >> >> into >> >> foo = skip_prefix_gently(foo, "bar", foo); > > Should this be skip_prefix_defval instead of skip_prefix_gently?
Yes.