From: Eric Sunshine Date: Sun, 19 Jun 2016 02:23:30 GMT Subject: Re: [PATCH] pathspec: prevent empty strings as pathspecs Message-ID: In-Reply-To: <1466300967.28660.9.camel@frank> On Sat, Jun 18, 2016 at 9:49 PM, David Turner wrote: > On Sat, 2016-06-18 at 20:57 -0400, Emily Xie wrote: >> + while (argv[n]) { >> + if (*argv[n] == '\0') { >> + die("Empty string is not a valid pathspec."); >> + } > > nit: git style doesn't use {} on one-statement ifs. Also, drop the full-stop (period) from the error message and, to be consistent with modern practice, don't capitalize the first word. Finally, the string should be localizable, so wrap it in _(...): die(_("empty string not valid pathspec"));