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

Re: [PATCH] quote_path: convert empty path to "./"

From
Jeff King <peff@peff.net>
Date
Dec 7, 2007, 20:49 UTC
Message-ID
<20071207204937.GA20111@coredump.intra.peff.net>
In-Reply-To
<4759996B.2000300@gmail.com>
On Fri, Dec 07, 2007 at 02:05:15PM -0500, Thomas Harning wrote:
Show 6 quoted lines
> I concur.  There is one case that this seems to dodge.  What about the case 
> where you are in:
>
> /test/test_2  where /test  is not tracked...
>
> This should probably show "./../"   not just "./"   , right?
It already says "../", which is correct:
  $ git init
  $ mkdir test && cd test
  $ touch file
  $ mkdir test2 && cd test2
  $ git status
  ...
  # Untracked files:
  #   (use "git add <file>..." to include in what will be committed)
  #
  #       ../

There's no point in ever saying "./" _except_ in the case where the output would be totally blank, since there is no way to tell that it is an output line.

Personally, I don't like either the "../" or the "./", but I actually think the relative paths are less readable than the full paths in general.

-Peff
Previous: Thomas HarningNext: Jeff King
Message 4 of 12 in “quote_path: convert empty path to "./"”
  1. quote_path: convert empty path to "./"Jeff King, Dec 7, 2007
  2. Johannes SchindelinDec 7, 2007
  3. Thomas HarningDec 7, 2007
  4. Jeff KingDec 7, 2007
  5. add status.relativePaths config variableJeff King, Dec 7, 2007
  6. Junio C HamanoDec 8, 2007
  7. Junio C HamanoDec 8, 2007
  8. Jeff KingDec 8, 2007
  9. Junio C HamanoDec 8, 2007
  10. Jeff KingDec 8, 2007
  11. Jeff KingDec 8, 2007
  12. Junio C HamanoDec 8, 2007

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.