Skip to content

Commit 42b2f89

Browse files
committed
Merge branch 'pt/enter-repo-comment-fix' into maint
Documentation update. * pt/enter-repo-comment-fix: enter_repo(): fix docs to match code
2 parents 1c30f8e + c8c3f1d commit 42b2f89

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

path.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -303,14 +303,9 @@ char *expand_user_path(const char *path)
303303
* (3) "relative/path" to mean cwd relative directory; or
304304
* (4) "/absolute/path" to mean absolute directory.
305305
*
306-
* Unless "strict" is given, we try access() for existence of "%s.git/.git",
307-
* "%s/.git", "%s.git", "%s" in this order. The first one that exists is
308-
* what we try.
309-
*
310-
* Second, we try chdir() to that. Upon failure, we return NULL.
311-
*
312-
* Then, we try if the current directory is a valid git repository.
313-
* Upon failure, we return NULL.
306+
* Unless "strict" is given, we check "%s/.git", "%s", "%s.git/.git", "%s.git"
307+
* in this order. We select the first one that is a valid git repository, and
308+
* chdir() to it. If none match, or we fail to chdir, we return NULL.
314309
*
315310
* If all goes well, we return the directory we used to chdir() (but
316311
* before ~user is expanded), avoiding getcwd() resolving symbolic

0 commit comments

Comments
 (0)