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
4
cache.h
4
cache.h
@ -330,7 +330,7 @@ static inline void remove_name_hash(struct cache_entry *ce)
|
||||
#define remove_file_from_cache(path) remove_file_from_index(&the_index, (path))
|
||||
#define add_to_cache(path, st, flags) add_to_index(&the_index, (path), (st), (flags))
|
||||
#define add_file_to_cache(path, flags) add_file_to_index(&the_index, (path), (flags))
|
||||
#define refresh_cache(flags) refresh_index(&the_index, (flags), NULL, NULL)
|
||||
#define refresh_cache(flags) refresh_index(&the_index, (flags), NULL, NULL, NULL)
|
||||
#define ce_match_stat(ce, st, options) ie_match_stat(&the_index, (ce), (st), (options))
|
||||
#define ce_modified(ce, st, options) ie_modified(&the_index, (ce), (st), (options))
|
||||
#define cache_name_exists(name, namelen, igncase) index_name_exists(&the_index, (name), (namelen), (igncase))
|
||||
@ -477,7 +477,7 @@ extern int check_path(const char *path, int len, struct stat *st);
|
||||
#define REFRESH_IGNORE_MISSING 0x0008 /* ignore non-existent */
|
||||
#define REFRESH_IGNORE_SUBMODULES 0x0010 /* ignore submodules */
|
||||
#define REFRESH_IN_PORCELAIN 0x0020 /* user friendly output, not "needs update" */
|
||||
extern int refresh_index(struct index_state *, unsigned int flags, const char **pathspec, char *seen);
|
||||
extern int refresh_index(struct index_state *, unsigned int flags, const char **pathspec, char *seen, char *header_msg);
|
||||
|
||||
struct lock_file {
|
||||
struct lock_file *next;
|
||||
|
Reference in New Issue
Block a user