зеркало из https://github.com/microsoft/git.git
Rename REFRESH_SAY_CHANGED to REFRESH_IN_PORCELAIN.
The change in the output is going to become more general than just saying "changed", so let's make the variable name more general too. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
044239b0a1
Коммит
43673fddd3
|
@ -105,7 +105,7 @@ static void refresh(int verbose, const char **pathspec)
|
||||||
for (specs = 0; pathspec[specs]; specs++)
|
for (specs = 0; pathspec[specs]; specs++)
|
||||||
/* nothing */;
|
/* nothing */;
|
||||||
seen = xcalloc(specs, 1);
|
seen = xcalloc(specs, 1);
|
||||||
refresh_index(&the_index, verbose ? REFRESH_SAY_CHANGED : REFRESH_QUIET,
|
refresh_index(&the_index, verbose ? REFRESH_IN_PORCELAIN : REFRESH_QUIET,
|
||||||
pathspec, seen);
|
pathspec, seen);
|
||||||
for (i = 0; i < specs; i++) {
|
for (i = 0; i < specs; i++) {
|
||||||
if (!seen[i])
|
if (!seen[i])
|
||||||
|
|
|
@ -261,7 +261,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
|
||||||
die("Cannot do %s reset with paths.",
|
die("Cannot do %s reset with paths.",
|
||||||
reset_type_names[reset_type]);
|
reset_type_names[reset_type]);
|
||||||
return read_from_tree(prefix, argv + i, sha1,
|
return read_from_tree(prefix, argv + i, sha1,
|
||||||
quiet ? REFRESH_QUIET : REFRESH_SAY_CHANGED);
|
quiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN);
|
||||||
}
|
}
|
||||||
if (reset_type == NONE)
|
if (reset_type == NONE)
|
||||||
reset_type = MIXED; /* by default */
|
reset_type = MIXED; /* by default */
|
||||||
|
@ -302,7 +302,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
|
||||||
break;
|
break;
|
||||||
case MIXED: /* Report what has not been updated. */
|
case MIXED: /* Report what has not been updated. */
|
||||||
update_index_refresh(0, NULL,
|
update_index_refresh(0, NULL,
|
||||||
quiet ? REFRESH_QUIET : REFRESH_SAY_CHANGED);
|
quiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
cache.h
2
cache.h
|
@ -476,7 +476,7 @@ extern int check_path(const char *path, int len, struct stat *st);
|
||||||
#define REFRESH_QUIET 0x0004 /* be quiet about it */
|
#define REFRESH_QUIET 0x0004 /* be quiet about it */
|
||||||
#define REFRESH_IGNORE_MISSING 0x0008 /* ignore non-existent */
|
#define REFRESH_IGNORE_MISSING 0x0008 /* ignore non-existent */
|
||||||
#define REFRESH_IGNORE_SUBMODULES 0x0010 /* ignore submodules */
|
#define REFRESH_IGNORE_SUBMODULES 0x0010 /* ignore submodules */
|
||||||
#define REFRESH_SAY_CHANGED 0x0020 /* say "changed" not "needs update" */
|
#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);
|
||||||
|
|
||||||
struct lock_file {
|
struct lock_file {
|
||||||
|
|
|
@ -1077,7 +1077,7 @@ int refresh_index(struct index_state *istate, unsigned int flags, const char **p
|
||||||
unsigned int options = really ? CE_MATCH_IGNORE_VALID : 0;
|
unsigned int options = really ? CE_MATCH_IGNORE_VALID : 0;
|
||||||
const char *needs_update_message;
|
const char *needs_update_message;
|
||||||
|
|
||||||
needs_update_message = ((flags & REFRESH_SAY_CHANGED)
|
needs_update_message = ((flags & REFRESH_IN_PORCELAIN)
|
||||||
? "locally modified" : "needs update");
|
? "locally modified" : "needs update");
|
||||||
for (i = 0; i < istate->cache_nr; i++) {
|
for (i = 0; i < istate->cache_nr; i++) {
|
||||||
struct cache_entry *ce, *new;
|
struct cache_entry *ce, *new;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче