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

[PATCH v1] Documentation: git-rev-parse: clarify that --git-dir does not necessarily show relative paths

From
Jon Seymour <jon.seymour@gmail.com>
Date
May 18, 2012, 09:23 UTC
Message-ID
<1337333004-23164-1-git-send-email-jon.seymour@gmail.com>
In-Reply-To
<20120517182304.GA14367@burratino>

The previous documentation was misleading because it lead the reader to believe that --git-dir would always show a relative path when, in fact, the actual behaviour does not guarantee this.

Rather, it was intended that the advice be given that if a relative path is shown, then the path is relative to the current working directory and not some other directory (for example, the root of the working tree).

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---
 Documentation/git-rev-parse.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index f63b81a..4cc3e95 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -137,7 +137,8 @@ shown.  If the pattern does not contain a globbing character (`?`,
 
 --git-dir::
 	Show `$GIT_DIR` if defined. Otherwise show the path to
-	the .git directory, relative to the current directory.
+	the .git directory. The path shown, when relative, is
+	relative to the current working directory.
 +
 If `$GIT_DIR` is not defined and the current directory
 is not detected to lie in a git repository or work tree
-- 
1.7.10.1.514.ge33c7ea
Previous: Jonathan NiederNext: Jonathan Nieder
Message 4 of 7 in “git rev-parse --git-dir does report yield relative path to git directory, per documentation”
  1. Jon SeymourMay 17, 2012
  2. Junio C HamanoMay 17, 2012
  3. Jonathan NiederMay 17, 2012
  4. Documentation: git-rev-parse: clarify that --git-dir does not necessarily show relative pathsJon Seymour, May 18, 2012
  5. Jonathan NiederMay 18, 2012
  6. Junio C HamanoMay 18, 2012
  7. Nguyen Thai Ngoc DuyMay 18, 2012

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.