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

Re: GIT_DIR not auto ignored

From
Dennis Kaarsemaker <dennis@kaarsemaker.net>
Date
Dec 1, 2013, 18:08 UTC
Message-ID
<1385921319.3240.3.camel@localhost>
In-Reply-To
<CAHJtQJ77drefyhjrs_C8bEq14ZiSNf6Boztqx+JYx51dRtrd-w@mail.gmail.com>
On za, 2013-11-30 at 23:06 -0800, Ingy dot Net wrote:
> Greetings,
> 
> I found this probable bug:
> https://gist.github.com/anonymous/01979fd9e6e285df41a2
Summary:

$ mv .git .foo $ export GIT_DIR=$PWD/.foo $ git status # On branch master # # Initial commit # # Untracked files: # .foo/ nothing added to commit but untracked files present

I checked with 1.8.5 and this still happens. And this also happens:
$ mv .git .foo 
$ export GIT_DIR=.foo
dennis@lightning:~/code/git$ touch .git
dennis@lightning:~/code/git$ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)
	.foo/

nothing added to commit but untracked files present (use "git add" to track)

(Note the absence of .git there)
-- 
Dennis Kaarsemaker
www.kaarsemaker.net
Previous: Ingy dot NetNext: Dennis Kaarsemaker
Message 2 of 17 in “GIT_DIR not auto ignored”
  1. Ingy dot NetDec 1, 2013
  2. Dennis KaarsemakerDec 1, 2013
  3. Dennis KaarsemakerDec 1, 2013
  4. path_treatment: also ignore $GIT_DIR if it's not .gitDennis Kaarsemaker, Dec 1, 2013
  5. Duy NguyenDec 1, 2013
  6. Thomas RastDec 1, 2013
  7. Dennis KaarsemakerDec 1, 2013
  8. Duy NguyenDec 2, 2013
  9. Dennis KaarsemakerDec 2, 2013
  10. Duy NguyenDec 2, 2013
  11. Dennis KaarsemakerDec 2, 2013
  12. Duy NguyenDec 2, 2013
  13. Eric SunshineDec 2, 2013
  14. Karsten BleesDec 3, 2013
  15. Junio C HamanoDec 3, 2013
  16. Karsten BleesDec 3, 2013
  17. Jonathan NiederDec 3, 2013

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.