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

Re: [RFC] status - don't show gitdir

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jun 30, 2011, 12:32 UTC
Message-ID
<BANLkTikCmWLar4ztZgrWdB-md2X3bUxATg@mail.gmail.com>
In-Reply-To
<1309434388-3536-1-git-send-email-iveqy@iveqy.com>
On Thu, Jun 30, 2011 at 6:46 PM, Fredrik Gustafsson <iveqy@iveqy.com> wrote:
> When gitdir is inside the working dir, don't show it as a untracked
> directory.

read_directory_recursive() and friends ignore .git by default. I think if you want to ignore the directory that .git file points to, you should update there. I'm too lazy to check the code (my read_directory_recursive is heavily modified currently), but I think it does not check file type for .git entries now.

But if we step back a bit, why do you want git to automatically ignore dirs that .git file points to? .git files are used to save real repo somewhere safe, e.g. outside working directory. You do not handle another case in your patch, where .git is a real symlink. In both cases, it's not hard to add "real-git-dir" to .git/info/excludes.

-- 
Duy
Previous: Fredrik GustafssonNext: Junio C Hamano
Message 3 of 5 in “Should 'git status' understand a .git containing "gitdir: dir"?”
  1. Eric RaibleJun 30, 2011
  2. [RFC] status - don't show gitdirFredrik Gustafsson, Jun 30, 2011
  3. Nguyen Thai Ngoc DuyJun 30, 2011
  4. Junio C HamanoJun 30, 2011
  5. Eric RaibleJun 30, 2011

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.