summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 127cfd0)
raw | patch | inline | side by side (parent: 127cfd0)
author | Brad Roberts <braddr@puremagic.com> | |
Sun, 15 May 2005 02:04:25 +0000 (19:04 -0700) | ||
committer | Petr Baudis <xpasky@machine.sinus.cz> | |
Sun, 15 May 2005 10:26:25 +0000 (12:26 +0200) |
Signed-off-by: Brad Roberts <braddr@puremagic.com>
Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Petr Baudis <pasky@ucw.cz>
cache.h | patch | blob | history | |
check-files.c | patch | blob | history | |
checkout-cache.c | patch | blob | history | |
diff-cache.c | patch | blob | history | |
diff-files.c | patch | blob | history | |
diff.c | patch | blob | history | |
read-cache.c | patch | blob | history | |
update-cache.c | patch | blob | history |
index 7696766dde0c8bd566a4529d6fa755da32f1482e..3eb97e7cc05cfd80f2f4f3c72267b8f5a83ccb76 100644 (file)
--- a/cache.h
+++ b/cache.h
extern int remove_entry_at(int pos);
extern int remove_file_from_cache(char *path);
extern int same_name(struct cache_entry *a, struct cache_entry *b);
-extern int cache_match_stat(struct cache_entry *ce, struct stat *st);
+extern int ce_match_stat(struct cache_entry *ce, struct stat *st);
extern int index_fd(unsigned char *sha1, int fd, struct stat *st);
#define MTIME_CHANGED 0x0001
diff --git a/check-files.c b/check-files.c
index bfd5590e047a6ee0f7d9db956cc489ffc23dcd5a..6fd69e79d6c253937498c553662ebe832a020449 100644 (file)
--- a/check-files.c
+++ b/check-files.c
if (lstat(path, &st) < 0)
die("lstat(%s): %s", path, strerror(errno));
- changed = cache_match_stat(ce, &st);
+ changed = ce_match_stat(ce, &st);
if (changed)
die("preparing to update file '%s' not uptodate in cache", path);
}
diff --git a/checkout-cache.c b/checkout-cache.c
index 18729374fc5da8a6c7b568fe571bac58e705545d..462aea55aff1885cac488e5710abeef6834c25c7 100644 (file)
--- a/checkout-cache.c
+++ b/checkout-cache.c
strcpy(path + len, ce->name);
if (!lstat(path, &st)) {
- unsigned changed = cache_match_stat(ce, &st);
+ unsigned changed = ce_match_stat(ce, &st);
if (!changed)
return 0;
if (!force) {
diff --git a/diff-cache.c b/diff-cache.c
index 84527190fef259dc8e8865693fe5591be86f79c4..afce9553feca7ce69bf59a1ff785dcf7203fb647 100644 (file)
--- a/diff-cache.c
+++ b/diff-cache.c
}
return -1;
}
- changed = cache_match_stat(ce, &st);
+ changed = ce_match_stat(ce, &st);
if (changed) {
mode = create_ce_mode(st.st_mode);
sha1 = no_sha1;
diff --git a/diff-files.c b/diff-files.c
index 28f1b13b384dc122daf2b16574536e944b0f6291..54dd8bf1766ee37f366406b0c05acd66923733a2 100644 (file)
--- a/diff-files.c
+++ b/diff-files.c
show_file('-', ce);
continue;
}
- changed = cache_match_stat(ce, &st);
+ changed = ce_match_stat(ce, &st);
if (!changed)
continue;
index 26b53cca30104eeae20b3b9f7caf9f5fd254948e..a237311d7a7358fca67633d648eaa5d257f87755 100644 (file)
--- a/diff.c
+++ b/diff.c
ce = active_cache[pos];
if ((lstat(name, &st) < 0) ||
!S_ISREG(st.st_mode) ||
- cache_match_stat(ce, &st) ||
+ ce_match_stat(ce, &st) ||
memcmp(sha1, ce->sha1, 20))
return 0;
return 1;
diff --git a/read-cache.c b/read-cache.c
index da2adf4612c3a1cb39fbb76e303302e9b7e1356b..ab2f202349020515edee0534e391dd6dced33f40 100644 (file)
--- a/read-cache.c
+++ b/read-cache.c
struct cache_entry **active_cache = NULL;
unsigned int active_nr = 0, active_alloc = 0, active_cache_changed = 0;
-int cache_match_stat(struct cache_entry *ce, struct stat *st)
+int ce_match_stat(struct cache_entry *ce, struct stat *st)
{
unsigned int changed = 0;
diff --git a/update-cache.c b/update-cache.c
index 19d8f826a5d266c3ca0271c5b29c7fc504632d30..a6f9d6c178be67db9c681f536c650791479e6ef4 100644 (file)
--- a/update-cache.c
+++ b/update-cache.c
if (lstat(ce->name, &st) < 0)
return ERR_PTR(-errno);
- changed = cache_match_stat(ce, &st);
+ changed = ce_match_stat(ce, &st);
if (!changed)
return ce;