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

git rev-parse --show-toplevel inside `.git` returns 0 and prints nothing

From
Anthony Sottile <asottile@umich.edu>
Date
Nov 18, 2019, 22:26 UTC
Message-ID
<CA+dzEBmrMavFJeyPSQr2wA9kFZwz_Kfr6PFBLRfLJ-EuCVXJnA@mail.gmail.com>
I would expect it to either:
- exit nonzero
- produce the full path to the root of the repository

would a patch be accepted which changes it to do one of those two things? I'd be happy to contribute such a patch

Anthony
Next: Junio C Hamano
Message 1 of 6 in “git rev-parse --show-toplevel inside `.git` returns 0 and prints nothing”
  1. Anthony SottileNov 18, 2019
  2. Junio C HamanoNov 19, 2019
  3. Jeff KingNov 19, 2019
  4. Anthony SottileNov 19, 2019
  5. Jeff KingNov 19, 2019
  6. Jeff KingNov 19, 2019

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.