summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 044239b)
raw | patch | inline | side by side (parent: 044239b)
author | Matthieu Moy <Matthieu.Moy@imag.fr> | |
Fri, 21 Aug 2009 08:57:58 +0000 (10:57 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 22 Aug 2009 03:45:40 +0000 (20:45 -0700) |
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>
"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>
builtin-add.c | patch | blob | history | |
builtin-reset.c | patch | blob | history | |
cache.h | patch | blob | history | |
read-cache.c | patch | blob | history |
diff --git a/builtin-add.c b/builtin-add.c
index 581a2a17480cc0ffa47a942ff58da4499aeac41d..a325bc9f0fe3efab7c061e33985118e65834bc28 100644 (file)
--- a/builtin-add.c
+++ b/builtin-add.c
for (specs = 0; pathspec[specs]; specs++)
/* nothing */;
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);
for (i = 0; i < specs; i++) {
if (!seen[i])
diff --git a/builtin-reset.c b/builtin-reset.c
index 5fa1789d0c2b90ef9ee83d091b67292f2ff0db26..ddf68d56a9b6a22da8576939da6c83c24db4b743 100644 (file)
--- a/builtin-reset.c
+++ b/builtin-reset.c
die("Cannot do %s reset with paths.",
reset_type_names[reset_type]);
return read_from_tree(prefix, argv + i, sha1,
- quiet ? REFRESH_QUIET : REFRESH_SAY_CHANGED);
+ quiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN);
}
if (reset_type == NONE)
reset_type = MIXED; /* by default */
break;
case MIXED: /* Report what has not been updated. */
update_index_refresh(0, NULL,
- quiet ? REFRESH_QUIET : REFRESH_SAY_CHANGED);
+ quiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN);
break;
}
index 9222774e6cd8a0d6edeedbe62e95136c198a87f6..ae0e83ebb65ae92176962f417d430f327c3457aa 100644 (file)
--- a/cache.h
+++ b/cache.h
#define REFRESH_QUIET 0x0004 /* be quiet about it */
#define REFRESH_IGNORE_MISSING 0x0008 /* ignore non-existent */
#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);
struct lock_file {
diff --git a/read-cache.c b/read-cache.c
index 4e3e272ee409de66de2059a8be475fddcaa4dc28..f1aff81f68f68bf4515e95668fa3da22bdd5ab16 100644 (file)
--- a/read-cache.c
+++ b/read-cache.c
@@ -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;
const char *needs_update_message;
- needs_update_message = ((flags & REFRESH_SAY_CHANGED)
+ needs_update_message = ((flags & REFRESH_IN_PORCELAIN)
? "locally modified" : "needs update");
for (i = 0; i < istate->cache_nr; i++) {
struct cache_entry *ce, *new;