From: Jeff King Date: Mon, 23 Jul 2012 20:53:21 GMT Subject: Re: [PATCH 2/3] commit: check committer identity more strictly Message-ID: <20120723205321.GB6745@sigill.intra.peff.net> In-Reply-To: <7vvchejj5e.fsf@alter.siamese.dyndns.org> On Mon, Jul 23, 2012 at 01:51:25PM -0700, Junio C Hamano wrote: > > diff --git a/builtin/commit.c b/builtin/commit.c > > index 95eeab1..20cef95 100644 > > --- a/builtin/commit.c > > +++ b/builtin/commit.c > > @@ -725,7 +725,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix, > > strbuf_release(&sb); > > > > /* This checks if committer ident is explicitly given */ > > - strbuf_addstr(&committer_ident, git_committer_info(0)); > > + strbuf_addstr(&committer_ident, git_committer_info(IDENT_STRICT)); > > if (use_editor && include_status) { > > char *ai_tmp, *ci_tmp; > > if (whence != FROM_COMMIT) > > Looks sensible. Is this something we can detect in automated tests, > or is it too cumbersome to set up? Sorry, I meant to mention that in the cover letter. No, we can't test this easily, because the code path in question is triggered by finding a blank name in /etc/passwd. We'd have to override our getpwent lookup. -Peff