summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 218e441)
raw | patch | inline | side by side (parent: 218e441)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Tue, 21 Jun 2005 04:18:54 +0000 (21:18 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Tue, 21 Jun 2005 04:18:54 +0000 (21:18 -0700) |
It suppresses the "needs update" message for subsequent "--refresh"
cases (but not other errors).
Will be useful for "git commit". Stay tuned.
cases (but not other errors).
Will be useful for "git commit". Stay tuned.
update-cache.c | patch | blob | history |
diff --git a/update-cache.c b/update-cache.c
index d2f79fa4535d3ec718b60a13a9a8c67d74323d8e..7c2698df6e7b08315e7d20bd40c1e7e313f52bf3 100644 (file)
--- a/update-cache.c
+++ b/update-cache.c
* like "git-update-cache *" and suddenly having all the object
* files be revision controlled.
*/
-static int allow_add = 0, allow_remove = 0, allow_replace = 0, not_new = 0;
+static int allow_add = 0, allow_remove = 0, allow_replace = 0, not_new = 0, quiet = 0;
static int force_remove;
/* Three functions to allow overloaded pointer return; see linux/err.h */
new = refresh_entry(ce);
if (IS_ERR(new)) {
- if (!(not_new && PTR_ERR(new) == -ENOENT)) {
- printf("%s: needs update\n", ce->name);
- has_errors = 1;
- }
+ if (not_new && PTR_ERR(new) == -ENOENT)
+ continue;
+ if (quiet)
+ continue;
+ printf("%s: needs update\n", ce->name);
+ has_errors = 1;
continue;
}
active_cache_changed = 1;
allow_options = 0;
continue;
}
+ if (!strcmp(path, "-q")) {
+ quiet = 1;
+ continue;
+ }
if (!strcmp(path, "--add")) {
allow_add = 1;
continue;