From 0454dd93bfb2334355ec62fff670d8c6cb3570a1 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Mon, 19 May 2008 23:49:26 -0700 Subject: Add support for GIT_CEILING_DIRECTORIES Make git recognize a new environment variable that prevents it from chdir'ing up into specified directories when looking for a GIT_DIR. Useful for avoiding slow network directories. For example, I use git in an environment where homedirs are automounted and "ls /home/nonexistent" takes about 9 seconds. Setting GIT_CEILING_DIRS="/home" allows "git help -a" (for bash completion) and "git symbolic-ref" (for my shell prompt) to run in a reasonable time. Signed-off-by: David Reiss Signed-off-by: Junio C Hamano --- test-path-utils.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test-path-utils.c') diff --git a/test-path-utils.c b/test-path-utils.c index 842b58018f..a0bcb0e210 100644 --- a/test-path-utils.c +++ b/test-path-utils.c @@ -17,5 +17,10 @@ int main(int argc, char **argv) } } + if (argc == 4 && !strcmp(argv[1], "longest_ancestor_length")) { + int len = longest_ancestor_length(argv[2], argv[3]); + printf("%d\n", len); + } + return 0; } -- cgit v1.2.1