From: Junio C Hamano Date: Thu, 10 Sep 2015 17:28:52 GMT Subject: Re: [PATCH v17 05/14] ref-filter: introduce match_atom_name() Message-ID: In-Reply-To: Karthik Nayak writes: > The check was for checking if there is anything after the colon, Why do you even care? If %(color) expects more specific customization by adding colon followed by specific data after it, i.e. %(color:something), %(color:) should clearly be that "%(color)" thing with no customization---if it is "not enough customization" or "leaving everything default" depends on each atom, match_atom_name() is not a good place to make that policy decision (i.e. Mattheiu's rewrite to clear *valp to NULL when %(color:) is seen). Instead, point *val to body + 1 just as usual, and let the caller tell between *val being NULL (not even any colon) and *val pointing at a NUL byte (nothing after colon) if it cares.