Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
authorPaul Tan <pyokagan@gmail.com>2015-03-31 16:39:27 +0300
committerJunio C Hamano <gitster@pobox.com>2015-03-31 20:19:53 +0300
commitc8c3f1d087f2195fd6ef61d6cca8241a808ac11a (patch)
treeef3d639175e20ff436b89b55f8707f38226f39af /path.c
parent282616c72d1d08a77ca4fe1186cb708c38408d87 (diff)
enter_repo(): fix docs to match code
In b3256eb (standardize and improve lookup rules for external local repos), enter_repo() was modified to use a different precedence ordering of suffixes for DWIM of the repository path, and to ensure that the repository path is actually valid instead of just testing for existence. However, the documentation was not modified to reflect these changes. Fix the documentation to match the code. Documentation contributed by Jeff King. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'path.c')
-rw-r--r--path.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/path.c b/path.c
index f10c91a927..c480634a31 100644
--- a/path.c
+++ b/path.c
@@ -301,14 +301,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