summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 40e88b9)
raw | patch | inline | side by side (parent: 40e88b9)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Tue, 12 Apr 2005 21:17:28 +0000 (14:17 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Tue, 12 Apr 2005 21:17:28 +0000 (14:17 -0700) |
It used to always overwrite them if forced. Now it just
realizes that they are already ok, and don't need to be
touched.
realizes that they are already ok, and don't need to be
touched.
checkout-cache.c | patch | blob | history |
diff --git a/checkout-cache.c b/checkout-cache.c
index 73a1a8d6680cb11aa9616948ff5aa72f2caa66bb..6ed8b69eca879aed6d25105d29533dc789918e73 100644 (file)
--- a/checkout-cache.c
+++ b/checkout-cache.c
static int checkout_entry(struct cache_entry *ce)
{
- if (!force) {
- struct stat st;
+ struct stat st;
- if (!stat(ce->name, &st)) {
- unsigned changed = cache_match_stat(ce, &st);
- if (changed && !quiet)
+ if (!stat(ce->name, &st)) {
+ unsigned changed = cache_match_stat(ce, &st);
+ if (!changed)
+ return 0;
+ if (!force) {
+ if (!quiet)
fprintf(stderr, "checkout-cache: %s already exists\n", ce->name);
return 0;
}