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

[PATCH] setup.c: fix comment about order of .git directory discovery

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Dec 7, 2017, 08:59 UTC
Message-ID
<20171207085949.19519-1-szeder.dev@gmail.com>

Since gitfiles were introduced in b44ebb19e (Add platform-independent .git "symlink", 2008-02-20) the order of checks during .git directory discovery is: gitfile, gitdir, bare repo. However, that commit did only partially update the in-code comment describing this order, missing the last line which still puts gitdir before gitfile.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---
 setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.c b/setup.c
index 03f51e056..b168d25db 100644
--- a/setup.c
+++ b/setup.c
@@ -921,7 +921,7 @@ static enum discovery_result setup_git_directory_gently_1(struct strbuf *dir,
 	 * - ../.git
 	 * - ../.git/
 	 * - ../ (bare)
-	 * - ../../.git/
+	 * - ../../.git
 	 *   etc.
 	 */
 	one_filesystem = !git_env_bool("GIT_DISCOVERY_ACROSS_FILESYSTEM", 0);
-- 
2.15.1.338.g53352fef7
Next: Jeff King
Message 1 of 2 in “setup.c: fix comment about order of .git directory discovery”
  1. setup.c: fix comment about order of .git directory discoverySZEDER Gábor, Dec 7, 2017
  2. Jeff KingDec 8, 2017

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.