git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v7 2/2] ident: add user.useConfigOnly boolean for when ident shouldn't be guessed

From
Dan Aloni <alonid@gmail.com>
Date
Feb 5, 2016, 22:18 UTC
Message-ID
<20160205221811.GB19465@gmail.com>
In-Reply-To
<20160205215952.GA4901@flurp.local>
On Fri, Feb 05, 2016 at 04:59:52PM -0500, Eric Sunshine wrote:
Show 11 quoted lines
> On Fri, Feb 05, 2016 at 11:29:06PM +0200, Dan Aloni wrote:
> > It used to be that:
> > 
> >    git config --global user.email "(none)"
> > 
> > was a viable way for people to force themselves to set user.email in
> > each repository.  This was helpful for people with more than one
> > email address, targeting different email addresses for different
> > clones, as it barred git from creating commit unless the user.email
> 
> Either: s/commit/a commit/ or s/commit/commits/
Thanks for all the proofing in your reply.
Show 22 quoted lines
>[..]
> > config was set in the per-repo config to the correct email address.
> > 
> > A recent change, 19ce497c (ident: keep a flag for bogus
> > default_email, 2015-12-10), however declared that an explicitly
> 
> s/however/&,/
> 
> > configured user.email is not bogus, no matter what its value is, so
> > this hack no longer works.
> > 
> > Provide the same functionality by adding a new configuration
> > variable user.useConfigOnly; when this variable is set, the
> > user must explicitly set user.email configuration.
> > 
> > Signed-off-by: Dan Aloni <alonid@gmail.com>
> > Helped-by: Jeff King <peff@peff.net>
> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
> > Cc: Eric Sunshine <sunshine@sunshineco.com>
> 
> You'd generally place your sign-off last.
> [..]
Good to know :)
> This test script still has a fair amount of unnecessary cruft in it
> which obscures the important bits showing what you are really
> testing. Below is a more concise version with the unnecessary stuff
> removed:

Thanks, though I'll stick to what Jeff suggested. Also, perhaps better to keep 'test_config' as it is instead of using '-c', to better mimick the tested use case.

-- 
Dan Aloni
Previous: Eric Sunshine
Message 8 of 8 in “ident: add user.useConfigOnly boolean for when ident shouldn't be guessed”
  1. ident: add user.useConfigOnly boolean for when ident shouldn't be guessedDan Aloni, Feb 5, 2016
  2. 1/2 fmt_ident: refactor strictness checksDan Aloni, Feb 5, 2016
  3. 2/2 ident: add user.useConfigOnly boolean for when ident shouldn't be guessedDan Aloni, Feb 5, 2016
  4. Jeff KingFeb 5, 2016
  5. Dan AloniFeb 5, 2016
  6. Junio C HamanoFeb 5, 2016
  7. Eric SunshineFeb 5, 2016
  8. Dan AloniFeb 5, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.