summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-02-17 04:44:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-17 04:44:47 (GMT)
commited78b064b4bb2468187ec351128013d3d6281d6b (patch)
treeae71e8535be6de126e5a9464c9f1e8e2e1d80223
parent0909d3f9816f8a85610cb25caefac2a7a03b282f (diff)
parente0020b2f82910f50bc697d86aff70c3796fbdc41 (diff)
downloadgit-ed78b064b4bb2468187ec351128013d3d6281d6b.zip
git-ed78b064b4bb2468187ec351128013d3d6281d6b.tar.gz
git-ed78b064b4bb2468187ec351128013d3d6281d6b.tar.bz2
Merge branch 'es/outside-repo-errmsg-hints' into next
Error message clarification. * es/outside-repo-errmsg-hints: prefix_path: show gitdir when arg is outside repo
-rw-r--r--pathspec.c3
-rw-r--r--setup.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/pathspec.c b/pathspec.c
index 128f27f..166d255 100644
--- a/pathspec.c
+++ b/pathspec.c
@@ -439,7 +439,8 @@ static void init_pathspec_item(struct pathspec_item *item, unsigned flags,
match = prefix_path_gently(prefix, prefixlen,
&prefixlen, copyfrom);
if (!match)
- die(_("%s: '%s' is outside repository"), elt, copyfrom);
+ die(_("%s: '%s' is outside repository at '%s'"), elt,
+ copyfrom, absolute_path(get_git_work_tree()));
}
item->match = match;
diff --git a/setup.c b/setup.c
index 12228c0..4ea7a0b 100644
--- a/setup.c
+++ b/setup.c
@@ -121,7 +121,8 @@ 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);
+ die(_("'%s' is outside repository at '%s'"), path,
+ absolute_path(get_git_work_tree()));
return r;
}