git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] setup.c: fix comment about order of .git directory discovery
@ 2017-12-07  8:59 SZEDER Gábor
  2017-12-08 10:02 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: SZEDER Gábor @ 2017-12-07  8:59 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, SZEDER Gábor

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] setup.c: fix comment about order of .git directory discovery
  2017-12-07  8:59 [PATCH] setup.c: fix comment about order of .git directory discovery SZEDER Gábor
@ 2017-12-08 10:02 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2017-12-08 10:02 UTC (permalink / raw)
  To: SZEDER Gábor; +Cc: Junio C Hamano, git

On Thu, Dec 07, 2017 at 09:59:49AM +0100, SZEDER Gábor wrote:

> 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.

I was confused at first, because your patch only changes to ".git/" to
".git". So there is no ordering change, only a swapping out of one for
the other. But that pushes done the ".git/" into the "etc." which is
below.

So I think this makes sense.

Thanks.

-Peff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-08 10:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-07  8:59 [PATCH] setup.c: fix comment about order of .git directory discovery SZEDER Gábor
2017-12-08 10:02 ` Jeff King

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).