summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8030e44)
raw | patch | inline | side by side (parent: 8030e44)
author | Junio C Hamano <gitster@pobox.com> | |
Sun, 4 Apr 2010 17:33:53 +0000 (10:33 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 4 Apr 2010 17:33:53 +0000 (10:33 -0700) |
Regarding the new environment variable, Linus Torvalds
<torvalds@linux-foundation.org> writes on Tue, 30 Mar 2010 in
<alpine.LFD.2.00.1003301537150.3707@i5.linux-foundation.org>:
I suspect that it is _very_ unusual to have a source repo that crosses
multiple filesystems, and the original reason for this patch-series
seems to me to be likely to be more common than that multi-fs case. So
having the logic go the other way would seem to match the common case,
no?
The "crossing filesystem boundary" condition is checked by comparing
st_dev field in the result from stat(2). This is slightly worrysome if
non-POSIX ports return different values in the field even for directories
in the same work tree extracted to the same "filesystem". Erik Faye-Lund
confirms that in the msysgit port st_dev is 0, so this should be safe, as
"even Windows is safe" ;-)
This will affect those who use /.git to cram /etc and /home/me in the same
repostiory, /home is mounted from non-root filesystem, and a git operation
is done from inside /home/me/src. But that is such a corner case we don't
want to give preference over helping people who will benefit from having
this default so that they do not have to suffer from slow automounters.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
<torvalds@linux-foundation.org> writes on Tue, 30 Mar 2010 in
<alpine.LFD.2.00.1003301537150.3707@i5.linux-foundation.org>:
I suspect that it is _very_ unusual to have a source repo that crosses
multiple filesystems, and the original reason for this patch-series
seems to me to be likely to be more common than that multi-fs case. So
having the logic go the other way would seem to match the common case,
no?
The "crossing filesystem boundary" condition is checked by comparing
st_dev field in the result from stat(2). This is slightly worrysome if
non-POSIX ports return different values in the field even for directories
in the same work tree extracted to the same "filesystem". Erik Faye-Lund
confirms that in the msysgit port st_dev is 0, so this should be safe, as
"even Windows is safe" ;-)
This will affect those who use /.git to cram /etc and /home/me in the same
repostiory, /home is mounted from non-root filesystem, and a git operation
is done from inside /home/me/src. But that is such a corner case we don't
want to give preference over helping people who will benefit from having
this default so that they do not have to suffer from slow automounters.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git.txt | patch | blob | history | |
setup.c | patch | blob | history |
diff --git a/Documentation/git.txt b/Documentation/git.txt
index bf1b45eef1e1e2904cbcc1fcbd84528618a5dc1d..aa620832092590b7c29b47c53d85dd3a3fdb640e 100644 (file)
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
(Useful for excluding slow-loading network directories.)
'GIT_ONE_FILESYSTEM'::
- If set to a true value ("true" or a non-zero integer), stop at
- filesystem boundaries when looking for a repository directory.
- Like 'GIT_CEILING_DIRECTORIES', it will not affect an explicit
- respository directory set via 'GIT_DIR' or on the command line.
+ When run in a directory that does not have ".git" repository
+ directory, git tries to find such a directory in the parent
+ directories to find the top of the working tree, but by default it
+ does not cross filesystem boundaries. This environment variable
+ can be set to false value ("false" or zero) to tell git not to
+ stop at filesystem boundaries. Like 'GIT_CEILING_DIRECTORIES',
+ this will not affect an explicit respository directory set via
+ 'GIT_DIR' or on the command line.
git Commits
~~~~~~~~~~~
index 8b911b1a38f2a937ad6c2b69870f2c30872181dc..d29063349052757b9e57ed1312fd073399161393 100644 (file)
--- a/setup.c
+++ b/setup.c
const char *gitdirenv;
const char *gitfile_dir;
int len, offset, ceil_offset, root_len;
- int current_device = 0, one_filesystem = 0;
+ int current_device = 0, one_filesystem = 1;
struct stat buf;
/*
}
cwd[offset] = '\0';
die("Not a git repository (or any parent up to mount parent %s)\n"
- "Stopping at filesystem boundary since GIT_ONE_FILESYSTEM is set.", cwd);
+ "Stopping at filesystem boundary since GIT_ONE_FILESYSTEM is true.", cwd);
}
}
if (chdir("..")) {