reset: make the reminder output consistent with "checkout"
git reset without argument displays a summary of the local modification,
like this:
$ git reset
Makefile: locally modified
Some people have problems with this; they look like an error message.
This patch makes its output mimic how "git checkout $another_branch"
reports the paths with local modifications. "git add --refresh --verbose"
is changed in the same way.
It also adds a header to make it clear that the output is informative,
and not an error.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
This commit is contained in:
committed by
Junio C Hamano
parent
43673fddd3
commit
3deffc52d8
@ -106,7 +106,7 @@ static void refresh(int verbose, const char **pathspec)
|
||||
/* nothing */;
|
||||
seen = xcalloc(specs, 1);
|
||||
refresh_index(&the_index, verbose ? REFRESH_IN_PORCELAIN : REFRESH_QUIET,
|
||||
pathspec, seen);
|
||||
pathspec, seen, "Unstaged changes after refreshing the index:");
|
||||
for (i = 0; i < specs; i++) {
|
||||
if (!seen[i])
|
||||
die("pathspec '%s' did not match any files", pathspec[i]);
|
||||
|
||||
Reference in New Issue
Block a user