]> git.ipfire.org Git - thirdparty/git.git/blobdiff - pathspec.c
git-prompt: change == to = for zsh's sake
[thirdparty/git.git] / pathspec.c
index 128f27fcb7ae8c88b0f7143943ea8a7171a83c5d..8243e06eab48373d12729959fde8fe666eb312b2 100644 (file)
@@ -438,8 +438,13 @@ static void init_pathspec_item(struct pathspec_item *item, unsigned flags,
        } else {
                match = prefix_path_gently(prefix, prefixlen,
                                           &prefixlen, copyfrom);
-               if (!match)
-                       die(_("%s: '%s' is outside repository"), elt, copyfrom);
+               if (!match) {
+                       const char *hint_path = get_git_work_tree();
+                       if (!hint_path)
+                               hint_path = get_git_dir();
+                       die(_("%s: '%s' is outside repository at '%s'"), elt,
+                           copyfrom, absolute_path(hint_path));
+               }
        }
 
        item->match = match;