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

Re: gitconfig includes

From
Eli Barzilay <eli@barzilay.org>
Date
Nov 30, 2016, 18:54 UTC
Message-ID
<CALO-gusHzTaLg=7X=KqYB==Yz_6yH6qkh8GDK54Lacu5ofD2pw@mail.gmail.com>
In-Reply-To
<xmqqeg1udkg4.fsf@gitster.mtv.corp.google.com>
On Tue, Nov 29, 2016 at 4:50 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> Jeff King <peff@peff.net> writes:
>
>> I think it's arguable whether "--global" should behave the same.
>
> I know you know this and I am writing this message for others.
>
> I admit that I wondered if "a single file" ought to cover these
> short-hand notations like --global and --local while re-reading the
> log message of 9b25a0b52 (config: add include directive,
> 2012-02-06).  In other words, I agree that it used to be arguable
> before we released v1.7.10.
>
> It no longer is arguable simply due to backward compatibilty.  The
> ship has long sailed.

I don't have any strong opinion, but FWIW, the use case I have for this is as follows: I sync my ~/.gitconfig between my own machine and a work machine. On the work machine though, I like people to have work emails, and I wrote some scripts that verify that. For my case, I added an include of a ~/.gitconfig.more which is not synced, and has values that override the ones in ~/.gitconfig. Since I'm the one who also wrote that script, I just added an "--includes" to the check so it won't barf on my setup, but had it not been my script I'd be stuck.

This is all a "FWIW" -- in case anyone thinks about use cases for a possible (future) change of the default.

-- 
                   ((x=>x(x))(x=>x(x)))                  Eli Barzilay:
                   http://barzilay.org/                  Maze is Life!
Previous: Junio C HamanoNext: Jeff King
Message 6 of 8 in “gitconfig includes”
  1. Eli BarzilayNov 29, 2016
  2. Junio C HamanoNov 29, 2016
  3. Eli BarzilayNov 29, 2016
  4. Jeff KingNov 29, 2016
  5. Junio C HamanoNov 29, 2016
  6. Eli BarzilayNov 30, 2016
  7. Jeff KingNov 30, 2016
  8. Eli BarzilayNov 30, 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.