summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorMatheus Tavares <matheus.bernardino@usp.br>2021-04-08 20:41:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-04-08 21:18:03 (GMT)
commit4e9569834936a8c0df8c9afdc0334f1b96b20914 (patch)
tree55b1a4a65a05c37d214ec7a6a35812136ea16182 /builtin
parenta5828ae6b52137b913b978e16cd2334482eb4c1f (diff)
downloadgit-4e9569834936a8c0df8c9afdc0334f1b96b20914.zip
git-4e9569834936a8c0df8c9afdc0334f1b96b20914.tar.gz
git-4e9569834936a8c0df8c9afdc0334f1b96b20914.tar.bz2
add: include magic part of pathspec on --refresh error
When `git add --refresh <pathspec>` doesn't find any matches for the given pathspec, it prints an error message using the `match` field of the `struct pathspec_item`. However, this field doesn't contain the magic part of the pathspec. Instead, let's use the `original` field. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/add.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/add.c b/builtin/add.c
index ea762a4..24ed7e2 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -187,7 +187,7 @@ static void refresh(int verbose, const struct pathspec *pathspec)
for (i = 0; i < pathspec->nr; i++) {
if (!seen[i])
die(_("pathspec '%s' did not match any files"),
- pathspec->items[i].match);
+ pathspec->items[i].original);
}
free(seen);
}