summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0ef3716)
raw | patch | inline | side by side (parent: 0ef3716)
author | Lars R. Damerow <lars@pixar.com> | |
Wed, 17 Mar 2010 19:55:52 +0000 (12:55 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 28 Mar 2010 16:19:11 +0000 (09:19 -0700) |
Without this truncation the error message printed only shows the cwd
from the start of the search, not where it failed.
Signed-off-by: Lars R. Damerow <lars@pixar.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
from the start of the search, not where it failed.
Signed-off-by: Lars R. Damerow <lars@pixar.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
setup.c | patch | blob | history |
index 5716d90b57574d045114f4aaad1bdf36fd79ed89..f0b56b9f545433d60644cf34d11eab798fee3a20 100644 (file)
--- a/setup.c
+++ b/setup.c
}
die("Not a git repository (or any of the parent directories): %s", DEFAULT_GIT_DIR_ENVIRONMENT);
}
- if (chdir(".."))
+ if (chdir("..")) {
+ cwd[offset] = '\0';
die_errno("Cannot change to '%s/..'", cwd);
+ }
}
inside_git_dir = 0;