summaryrefslogtreecommitdiff
path: root/builtin-reset.c
diff options
context:
space:
mode:
authorLibravatar Matthieu Moy <Matthieu.Moy@imag.fr>2009-08-21 10:57:59 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-08-21 21:19:35 -0700
commit3deffc52d88df73af72a80a406eb863880bb4d2a (patch)
tree2480b9d9bf4492de8279531ead66bd32ee5032e0 /builtin-reset.c
parentRename REFRESH_SAY_CHANGED to REFRESH_IN_PORCELAIN. (diff)
downloadtgif-3deffc52d88df73af72a80a406eb863880bb4d2a.tar.xz
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>
Diffstat (limited to 'builtin-reset.c')
-rw-r--r--builtin-reset.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-reset.c b/builtin-reset.c
index ddf68d56a9..0fc0b0743f 100644
--- a/builtin-reset.c
+++ b/builtin-reset.c
@@ -108,7 +108,8 @@ static int update_index_refresh(int fd, struct lock_file *index_lock, int flags)
if (read_cache() < 0)
return error("Could not read index");
- result = refresh_cache(flags) ? 1 : 0;
+ result = refresh_index(&the_index, (flags), NULL, NULL,
+ "Unstaged changes after reset:") ? 1 : 0;
if (write_cache(fd, active_cache, active_nr) ||
commit_locked_index(index_lock))
return error ("Could not refresh index");