mirror of
https://github.com/git/git.git
synced 2024-11-24 02:17:02 +08:00
Merge branch 'pt/enter-repo-comment-fix'
* pt/enter-repo-comment-fix: enter_repo(): fix docs to match code
This commit is contained in:
commit
bf2cfcaabf
11
path.c
11
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
|
||||
|
Loading…
Reference in New Issue
Block a user