Skip to content

Commit f97741f

Browse files
committed
Merge branch 'es/outside-repo-errmsg-hints'
Error message clarification. * es/outside-repo-errmsg-hints: prefix_path: show gitdir when arg is outside repo
2 parents 1235384 + e0020b2 commit f97741f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pathspec.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,8 @@ static void init_pathspec_item(struct pathspec_item *item, unsigned flags,
439439
match = prefix_path_gently(prefix, prefixlen,
440440
&prefixlen, copyfrom);
441441
if (!match)
442-
die(_("%s: '%s' is outside repository"), elt, copyfrom);
442+
die(_("%s: '%s' is outside repository at '%s'"), elt,
443+
copyfrom, absolute_path(get_git_work_tree()));
443444
}
444445

445446
item->match = match;

setup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ char *prefix_path(const char *prefix, int len, const char *path)
121121
{
122122
char *r = prefix_path_gently(prefix, len, NULL, path);
123123
if (!r)
124-
die(_("'%s' is outside repository"), path);
124+
die(_("'%s' is outside repository at '%s'"), path,
125+
absolute_path(get_git_work_tree()));
125126
return r;
126127
}
127128

0 commit comments

Comments
 (0)