From: Junio C Hamano Date: Wed, 18 Dec 2013 17:51:40 GMT Subject: Re: [PATCH 03/12] Add and use skip_prefix_defval() Message-ID: In-Reply-To: <20131218162746.GA15334@sl4mmy.zerosphere.org> "Kent R. Spillner" writes: > 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.