@matheusbsbs / matheus-bagliano / commits / cf87463e79
Fork 0

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>

Junio C Hamano committed Apr 4, 2010 at 14:49 UTC cf87463e79a3018f666bfc9af113d3eea58a3d82
2 files changed +7 -7
Documentation/git.txt
+5 -5
@@ -530,15 +530,15 @@ git so take care if using Cogito etc.
530 a GIT_DIR set on the command line or in the environment.
531 (Useful for excluding slow-loading network directories.)
532
533 -'GIT_ONE_FILESYSTEM'::
533 +'GIT_DISCOVERY_ACROSS_FILESYSTEM'::
534 When run in a directory that does not have ".git" repository
535 directory, git tries to find such a directory in the parent
536 directories to find the top of the working tree, but by default it
537 does not cross filesystem boundaries. This environment variable
538 - can be set to false value ("false" or zero) to tell git not to
539 - stop at filesystem boundaries. Like 'GIT_CEILING_DIRECTORIES',
540 - this will not affect an explicit respository directory set via
541 - 'GIT_DIR' or on the command line.
538 + can be set to true to tell git not to stop at filesystem
539 + boundaries. Like 'GIT_CEILING_DIRECTORIES', this will not affect
540 + an explicit repository directory set via 'GIT_DIR' or on the
541 + command line.
542
543 git Commits
544 ~~~~~~~~~~~
setup.c
+2 -2
@@ -392,7 +392,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
392 * etc.
393 */
394 offset = len = strlen(cwd);
395 - one_filesystem = git_env_bool("GIT_ONE_FILESYSTEM", 0);
395 + one_filesystem = !git_env_bool("GIT_DISCOVERY_ACROSS_FILESYSTEM", 0);
396 if (one_filesystem) {
397 if (stat(".", &buf))
398 die_errno("failed to stat '.'");
@@ -444,7 +444,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
444 }
445 cwd[offset] = '\0';
446 die("Not a git repository (or any parent up to mount parent %s)\n"
447 - "Stopping at filesystem boundary since GIT_ONE_FILESYSTEM is true.", cwd);
447 + "Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).", cwd);
448 }
449 }
450 if (chdir("..")) {