Browse Source

Rename cache_match_stat() to ce_match_stat()

Signed-off-by: Brad Roberts <braddr@puremagic.com>
Signed-off-by: Petr Baudis <pasky@ucw.cz>
maint
Brad Roberts 20 years ago committed by Petr Baudis
parent
commit
5d728c8411
  1. 2
      cache.h
  2. 2
      check-files.c
  3. 2
      checkout-cache.c
  4. 2
      diff-cache.c
  5. 2
      diff-files.c
  6. 2
      diff.c
  7. 2
      read-cache.c
  8. 2
      update-cache.c

2
cache.h

@ -129,7 +129,7 @@ extern int add_cache_entry(struct cache_entry *ce, int option);
extern int remove_entry_at(int pos); extern int remove_entry_at(int pos);
extern int remove_file_from_cache(char *path); extern int remove_file_from_cache(char *path);
extern int same_name(struct cache_entry *a, struct cache_entry *b); 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); extern int index_fd(unsigned char *sha1, int fd, struct stat *st);


#define MTIME_CHANGED 0x0001 #define MTIME_CHANGED 0x0001

2
check-files.c

@ -31,7 +31,7 @@ static void check_file(const char *path)
if (lstat(path, &st) < 0) if (lstat(path, &st) < 0)
die("lstat(%s): %s", path, strerror(errno)); die("lstat(%s): %s", path, strerror(errno));


changed = cache_match_stat(ce, &st); changed = ce_match_stat(ce, &st);
if (changed) if (changed)
die("preparing to update file '%s' not uptodate in cache", path); die("preparing to update file '%s' not uptodate in cache", path);
} }

2
checkout-cache.c

@ -167,7 +167,7 @@ static int checkout_entry(struct cache_entry *ce, const char *base_dir)
strcpy(path + len, ce->name); strcpy(path + len, ce->name);


if (!lstat(path, &st)) { if (!lstat(path, &st)) {
unsigned changed = cache_match_stat(ce, &st); unsigned changed = ce_match_stat(ce, &st);
if (!changed) if (!changed)
return 0; return 0;
if (!force) { if (!force) {

2
diff-cache.c

@ -33,7 +33,7 @@ static int get_stat_data(struct cache_entry *ce, unsigned char **sha1p, unsigned
} }
return -1; return -1;
} }
changed = cache_match_stat(ce, &st); changed = ce_match_stat(ce, &st);
if (changed) { if (changed) {
mode = create_ce_mode(st.st_mode); mode = create_ce_mode(st.st_mode);
sha1 = no_sha1; sha1 = no_sha1;

2
diff-files.c

@ -121,7 +121,7 @@ int main(int argc, char **argv)
show_file('-', ce); show_file('-', ce);
continue; continue;
} }
changed = cache_match_stat(ce, &st); changed = ce_match_stat(ce, &st);
if (!changed) if (!changed)
continue; continue;



2
diff.c

@ -175,7 +175,7 @@ static int work_tree_matches(const char *name, const unsigned char *sha1)
ce = active_cache[pos]; ce = active_cache[pos];
if ((lstat(name, &st) < 0) || if ((lstat(name, &st) < 0) ||
!S_ISREG(st.st_mode) || !S_ISREG(st.st_mode) ||
cache_match_stat(ce, &st) || ce_match_stat(ce, &st) ||
memcmp(sha1, ce->sha1, 20)) memcmp(sha1, ce->sha1, 20))
return 0; return 0;
return 1; return 1;

2
read-cache.c

@ -9,7 +9,7 @@
struct cache_entry **active_cache = NULL; struct cache_entry **active_cache = NULL;
unsigned int active_nr = 0, active_alloc = 0, active_cache_changed = 0; 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; unsigned int changed = 0;



2
update-cache.c

@ -191,7 +191,7 @@ static struct cache_entry *refresh_entry(struct cache_entry *ce)
if (lstat(ce->name, &st) < 0) if (lstat(ce->name, &st) < 0)
return ERR_PTR(-errno); return ERR_PTR(-errno);


changed = cache_match_stat(ce, &st); changed = ce_match_stat(ce, &st);
if (!changed) if (!changed)
return ce; return ce;



Loading…
Cancel
Save