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

Re: [PATCH v2] git prompt: Use toplevel to find untracked files.

From
CTCody Taylor <cody.taylor@maternityneighborhood.com>
Date
Mar 16, 2015, 00:54 UTC
Message-ID
<CAHWMk2aq7dW5nBW1f8T4TWfRC70hp-6kR5P79m_E4zccuy53aA@mail.gmail.com>
SZEDER Gábor <szeder@ira.uka.de> writes:
> Somehow I had a hard time making sense out of "when the current working
> directory was not a parent of the untracked file".  Perhaps "when the
> untracked files are outside of the current working directory" would be
> easier to grok?
That description doesn't cover all cases.

Scenario #1: Let's say there is an untracked file at `$ROOT/file`. When your CWD is `$ROOT/`, all is well. If you cd to `$ROOT/src/` the ls-files command failed to find the untracked file.

Scenario #2: Let's say there is an untracked file at `$ROOT/src/file`. The ls-files command would find the file if the CWD is `$ROOT/` or `$ROOT/src/`, but not if the CWD is `$ROOT/bin/` or `$ROOT/src/folder/`.

Your description may be easier to understand, but I don't agree it's accurate.
Next: SZEDER Gábor
Message 1 of 2 in “Re: [PATCH v2] git prompt: Use toplevel to find untracked files.”
  1. Cody TaylorMar 16, 2015
  2. SZEDER GáborMar 21, 2015

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.