]> git.ipfire.org Git - thirdparty/git.git/blobdiff - setup.c
t7063: more thorough status checking
[thirdparty/git.git] / setup.c
diff --git a/setup.c b/setup.c
index e2a479a64fa4076bad8eaf6cf0949d0ae263da9d..f4897287f768b0ab9d247b757a04ec63e463b4e0 100644 (file)
--- a/setup.c
+++ b/setup.c
@@ -120,8 +120,13 @@ char *prefix_path_gently(const char *prefix, int len,
 char *prefix_path(const char *prefix, int len, const char *path)
 {
        char *r = prefix_path_gently(prefix, len, NULL, path);
-       if (!r)
-               die(_("'%s' is outside repository"), path);
+       if (!r) {
+               const char *hint_path = get_git_work_tree();
+               if (!hint_path)
+                       hint_path = get_git_dir();
+               die(_("'%s' is outside repository at '%s'"), path,
+                   absolute_path(hint_path));
+       }
        return r;
 }