add: include magic part of pathspec on --refresh error
commit4e9569834936a8c0df8c9afdc0334f1b96b20914
authorMatheus Tavares <matheus.bernardino@usp.br>
Thu, 8 Apr 2021 20:41:22 +0000 (8 17:41 -0300)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Apr 2021 21:18:03 +0000 (8 14:18 -0700)
tree55b1a4a65a05c37d214ec7a6a35812136ea16182
parenta5828ae6b52137b913b978e16cd2334482eb4c1f
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>
builtin/add.c
t/t3700-add.sh