Skip to content

Commit 43673fd

Browse files
moygitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 044239b commit 43673fd

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

builtin-add.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static void refresh(int verbose, const char **pathspec)
105105
for (specs = 0; pathspec[specs]; specs++)
106106
/* nothing */;
107107
seen = xcalloc(specs, 1);
108-
refresh_index(&the_index, verbose ? REFRESH_SAY_CHANGED : REFRESH_QUIET,
108+
refresh_index(&the_index, verbose ? REFRESH_IN_PORCELAIN : REFRESH_QUIET,
109109
pathspec, seen);
110110
for (i = 0; i < specs; i++) {
111111
if (!seen[i])

builtin-reset.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
261261
die("Cannot do %s reset with paths.",
262262
reset_type_names[reset_type]);
263263
return read_from_tree(prefix, argv + i, sha1,
264-
quiet ? REFRESH_QUIET : REFRESH_SAY_CHANGED);
264+
quiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN);
265265
}
266266
if (reset_type == NONE)
267267
reset_type = MIXED; /* by default */
@@ -302,7 +302,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
302302
break;
303303
case MIXED: /* Report what has not been updated. */
304304
update_index_refresh(0, NULL,
305-
quiet ? REFRESH_QUIET : REFRESH_SAY_CHANGED);
305+
quiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN);
306306
break;
307307
}
308308

cache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ extern int check_path(const char *path, int len, struct stat *st);
476476
#define REFRESH_QUIET 0x0004 /* be quiet about it */
477477
#define REFRESH_IGNORE_MISSING 0x0008 /* ignore non-existent */
478478
#define REFRESH_IGNORE_SUBMODULES 0x0010 /* ignore submodules */
479-
#define REFRESH_SAY_CHANGED 0x0020 /* say "changed" not "needs update" */
479+
#define REFRESH_IN_PORCELAIN 0x0020 /* user friendly output, not "needs update" */
480480
extern int refresh_index(struct index_state *, unsigned int flags, const char **pathspec, char *seen);
481481

482482
struct lock_file {

read-cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ int refresh_index(struct index_state *istate, unsigned int flags, const char **p
10771077
unsigned int options = really ? CE_MATCH_IGNORE_VALID : 0;
10781078
const char *needs_update_message;
10791079

1080-
needs_update_message = ((flags & REFRESH_SAY_CHANGED)
1080+
needs_update_message = ((flags & REFRESH_IN_PORCELAIN)
10811081
? "locally modified" : "needs update");
10821082
for (i = 0; i < istate->cache_nr; i++) {
10831083
struct cache_entry *ce, *new;

0 commit comments

Comments
 (0)