Rename ONE_FILESYSTEM to DISCOVERY_ACROSS_FILESYSTEM
If a missing ONE_FILESYSTEM defaults to true, the only users who set this variable set it to false to tell git not to limit the discovery to one filesystem; there are too many negations in one sentence to make a simple panda brain dizzy. Use the variable GIT_DISCOVERY_ACROSS_FILESYSTEM that changes the behaviour from the default "limit to one filesystem" to "cross the boundary as I ask you to"; makes the semantics much more straight forward. Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
e640551773
commit
cf87463e79
|
@ -530,15 +530,15 @@ git so take care if using Cogito etc.
|
||||||
a GIT_DIR set on the command line or in the environment.
|
a GIT_DIR set on the command line or in the environment.
|
||||||
(Useful for excluding slow-loading network directories.)
|
(Useful for excluding slow-loading network directories.)
|
||||||
|
|
||||||
'GIT_ONE_FILESYSTEM'::
|
'GIT_DISCOVERY_ACROSS_FILESYSTEM'::
|
||||||
When run in a directory that does not have ".git" repository
|
When run in a directory that does not have ".git" repository
|
||||||
directory, git tries to find such a directory in the parent
|
directory, git tries to find such a directory in the parent
|
||||||
directories to find the top of the working tree, but by default it
|
directories to find the top of the working tree, but by default it
|
||||||
does not cross filesystem boundaries. This environment variable
|
does not cross filesystem boundaries. This environment variable
|
||||||
can be set to false value ("false" or zero) to tell git not to
|
can be set to true to tell git not to stop at filesystem
|
||||||
stop at filesystem boundaries. Like 'GIT_CEILING_DIRECTORIES',
|
boundaries. Like 'GIT_CEILING_DIRECTORIES', this will not affect
|
||||||
this will not affect an explicit respository directory set via
|
an explicit repository directory set via 'GIT_DIR' or on the
|
||||||
'GIT_DIR' or on the command line.
|
command line.
|
||||||
|
|
||||||
git Commits
|
git Commits
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
|
4
setup.c
4
setup.c
|
@ -392,7 +392,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
|
||||||
* etc.
|
* etc.
|
||||||
*/
|
*/
|
||||||
offset = len = strlen(cwd);
|
offset = len = strlen(cwd);
|
||||||
one_filesystem = git_env_bool("GIT_ONE_FILESYSTEM", 0);
|
one_filesystem = !git_env_bool("GIT_DISCOVERY_ACROSS_FILESYSTEM", 0);
|
||||||
if (one_filesystem) {
|
if (one_filesystem) {
|
||||||
if (stat(".", &buf))
|
if (stat(".", &buf))
|
||||||
die_errno("failed to stat '.'");
|
die_errno("failed to stat '.'");
|
||||||
|
@ -444,7 +444,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
|
||||||
}
|
}
|
||||||
cwd[offset] = '\0';
|
cwd[offset] = '\0';
|
||||||
die("Not a git repository (or any parent up to mount parent %s)\n"
|
die("Not a git repository (or any parent up to mount parent %s)\n"
|
||||||
"Stopping at filesystem boundary since GIT_ONE_FILESYSTEM is true.", cwd);
|
"Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).", cwd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chdir("..")) {
|
if (chdir("..")) {
|
||||||
|
|
Loading…
Reference in New Issue