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

Re: [PATCH] add: allow configurations to be overriden by command line

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 18, 2009, 16:40 UTC
Message-ID
<7vfxdxxzps.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1245316674-32377-1-git-send-email-bebarino@gmail.com>
Stephen Boyd <bebarino@gmail.com> writes:
> Don't call git_config after parsing the command line options, otherwise
> the config settings will override any settings made by the command line.
Amusing.

This dates back to the original 0d78153 (Do "git add" as a builtin, 2006-05-17). It had two git_config() calls (one before command line parsing, and then another).

Then 11be42a (Make git-mv a builtin, 2006-07-26) noticed this duplicate calls, and removed the wrong one.

The calling sequence has been the same ever since; parse-opt-ification 5c46f75 (Port builtin-add.c to use the new option parser., 2007-10-03) did not affect it either.

Perhaps this deserves a test. It is an ancient breakage nobody noticed so far.

Thanks
Previous: Stephen BoydNext: Stephen Boyd
Message 2 of 7 in “add: allow configurations to be overriden by command line”
  1. add: allow configurations to be overriden by command lineStephen Boyd, Jun 18, 2009
  2. Junio C HamanoJun 18, 2009
  3. Stephen BoydJun 18, 2009
  4. Junio C HamanoJun 18, 2009
  5. Stephen BoydJun 18, 2009
  6. t3700-add: add a POSIXPERM prerequisite to a new testJohannes Sixt, Jun 22, 2009
  7. Junio C HamanoJun 22, 2009

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.