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

Re: is there a truly compelling rationale for .git/info/exclude?

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Oct 7, 2017, 21:20 UTC
Message-ID
<20171007212058.676kdlwyxvtw3gi5@genre.crustytoothpaste.net>
In-Reply-To
<alpine.LFD.2.21.1710061337300.14079@localhost.localdomain>
On Fri, Oct 06, 2017 at 01:39:16PM -0400, Robert P. J. Day wrote:
Show 17 quoted lines
> On Fri, 6 Oct 2017, Junio C Hamano wrote:
> > This is primarily why .git/info/exclude exists.  A user who does not
> > use the same set of tools to work on different projects may not be
> > able to use ~/.gitconfig with core.excludesFile pointing at a single
> > place that applies to _all_ repositories the user touches.
> >
> > Also, core.excludesFile came a lot later than in-project and
> > in-repository exclude list, IIRC.
> >
> > Don't waste time by seeking a "compelling" reason.  A mere "this is
> > the most expedite way to gain convenience" back when something was
> > introduced could be an answer, and it is way too late to complain
> > about such a choice anyway.
> 
>   perfectly respectable answer ... it tells me that, between
> .gitignore files and core.excludesFile, there's not much left for
> .git/info/exclude to do, except in weird circumstances.

A place where I use it is in some Vim package repositories that I have as submodules of my home directory. The author of those repositories, Tim Pope, explicitly does not exclude the helptags output. I simply ignore those files using .git/info/exclude.

Another case is when I install a plugin that lives below a our main product repository at work. I can simply exclude that plugin locally on my system without the need to submit a change for merge. I can later remove those patterns if I like and run git clean -df to clean up.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204
Previous: Jonathan NiederNext: Johannes Schindelin
Message 5 of 10 in “is there a truly compelling rationale for .git/info/exclude?”
  1. rpjday@crashcourse.caOct 6, 2017
  2. Junio C HamanoOct 6, 2017
  3. Robert P. J. DayOct 6, 2017
  4. Jonathan NiederOct 6, 2017
  5. brian m. carlsonOct 7, 2017
  6. Johannes SchindelinOct 12, 2017
  7. Jeff KingOct 12, 2017
  8. Robert P. J. DayOct 13, 2017
  9. Kaartic SivaraamOct 6, 2017
  10. Steinar BangOct 8, 2017

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.