diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2013-06-20 10:37:50 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-20 15:50:17 -0700 |
commit | c21d39d7c7eb07eed0be301a72856bff65201256 (patch) | |
tree | 694012453e32b8ff4f241319e6fdc8836abb3fa6 /builtin | |
parent | packed_ref_cache: increment refcount when locked (diff) | |
download | tgif-c21d39d7c7eb07eed0be301a72856bff65201256.tar.xz |
Extract a struct stat_data from cache_entry
Add public functions fill_stat_data() and match_stat_data() to work
with it. This infrastructure will later be used to check the validity
of other types of file.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/ls-files.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 22020729cb..6a0730f720 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -165,11 +165,13 @@ static void show_ce_entry(const char *tag, struct cache_entry *ce) } write_name(ce->name, ce_namelen(ce)); if (debug_mode) { - printf(" ctime: %d:%d\n", ce->ce_ctime.sec, ce->ce_ctime.nsec); - printf(" mtime: %d:%d\n", ce->ce_mtime.sec, ce->ce_mtime.nsec); - printf(" dev: %d\tino: %d\n", ce->ce_dev, ce->ce_ino); - printf(" uid: %d\tgid: %d\n", ce->ce_uid, ce->ce_gid); - printf(" size: %d\tflags: %x\n", ce->ce_size, ce->ce_flags); + struct stat_data *sd = &ce->ce_stat_data; + + printf(" ctime: %d:%d\n", sd->sd_ctime.sec, sd->sd_ctime.nsec); + printf(" mtime: %d:%d\n", sd->sd_mtime.sec, sd->sd_mtime.nsec); + printf(" dev: %d\tino: %d\n", sd->sd_dev, sd->sd_ino); + printf(" uid: %d\tgid: %d\n", sd->sd_uid, sd->sd_gid); + printf(" size: %d\tflags: %x\n", sd->sd_size, ce->ce_flags); } } |