summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-04-21 12:12:23 -0700
committerJunio C Hamano <gitster@pobox.com>2015-04-21 12:12:23 -0700
commit42b2f894a0237e3b393770330dba995e731ec7ad (patch)
treea118be0226ecce1a135be329d57359f9d0def11b
parent1c30f8efa4ce4e9f5a3a41bf0236fe5baf2b6063 (diff)
parentc8c3f1d087f2195fd6ef61d6cca8241a808ac11a (diff)
downloadgit-42b2f894a0237e3b393770330dba995e731ec7ad.tar.gz
Merge branch 'pt/enter-repo-comment-fix' into maint
Documentation update. * pt/enter-repo-comment-fix: enter_repo(): fix docs to match code
-rw-r--r--path.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/path.c b/path.c
index e608993801..595da81ca6 100644
--- a/path.c
+++ b/path.c
@@ -303,14 +303,9 @@ return_null:
* (3) "relative/path" to mean cwd relative directory; or
* (4) "/absolute/path" to mean absolute directory.
*
- * Unless "strict" is given, we try access() for existence of "%s.git/.git",
- * "%s/.git", "%s.git", "%s" in this order. The first one that exists is
- * what we try.
- *
- * Second, we try chdir() to that. Upon failure, we return NULL.
- *
- * Then, we try if the current directory is a valid git repository.
- * Upon failure, we return NULL.
+ * Unless "strict" is given, we check "%s/.git", "%s", "%s.git/.git", "%s.git"
+ * in this order. We select the first one that is a valid git repository, and
+ * chdir() to it. If none match, or we fail to chdir, we return NULL.
*
* If all goes well, we return the directory we used to chdir() (but
* before ~user is expanded), avoiding getcwd() resolving symbolic