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

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

From
Dan Aloni <alonid@gmail.com>
Date
Feb 5, 2016, 21:14 UTC
Message-ID
<20160205211435.GB7245@gmail.com>
In-Reply-To
<xmqqio23c5t5.fsf@gitster.mtv.corp.google.com>
On Fri, Feb 05, 2016 at 11:31:34AM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> > +	If you have multiple email addresses that you would like to set
> > +	up per repository, you may want to set this to 'true' in the global
> > +	config, and then Git would prompt you to set user.email separately,
> > +	in each of the cloned repositories.
> 
> The first sentence mentioned both name and email, but here the
> example is only about email.  A first time reader might be led into
> thinking this is only about email and not name, but I am assuming
> that is not the intention (i.e. this is merely showing just one use
> case).
>[..]
Going to revise per yours and Jeff's suggestions.
Show 5 quoted lines
>[..]
> I can read the split expression either with && hanging at the end of
> line or && leading the next line just fine, but you'd want to be
> consistent especially when you are writing two almost identical
> things.
Sure.
Show 11 quoted lines
>[..]
> 	test_expect_success 'suceed with config' '
>         	test_when_finished reprepare &&
> 		test_config user.email test@ok.com &&
>                 test_must_fail git commit -m msg
> 	'
> 
> Note that you do not need "test_unconfig user.email" in reprepare,
> as the variable is set in one test with test_config, which uses
> test_when_finished to arrange the variable to be removed after
> running the test.

Alright. It was worth to understand the differing behavior between 'test_config' and 'git config'.

-- 
Dan Aloni
Previous: Junio C HamanoNext: Dan Aloni
Message 7 of 11 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/3 fmt_ident: refactor strictness checksDan Aloni, Feb 5, 2016
  3. 2/3 ident: add user.useConfigOnly boolean for when ident shouldn't be guessedDan Aloni, Feb 5, 2016
  4. Jeff KingFeb 5, 2016
  5. Eric SunshineFeb 5, 2016
  6. Junio C HamanoFeb 5, 2016
  7. Dan AloniFeb 5, 2016
  8. 3/3 ident: cleanup wrt ident's sourceDan Aloni, Feb 5, 2016
  9. Junio C HamanoFeb 5, 2016
  10. Jeff KingFeb 5, 2016
  11. 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.