diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-06-30 15:40:01 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-30 15:40:05 -0700 |
commit | 079424a2cffa9c5a96c958ec50bb5a865a9305cf (patch) | |
tree | 09bd5381af78c8e2d1d86690c7568e2cf7279d93 /builtin/ls-files.c | |
parent | 08585fd48d2d3d8facce9bdc366cfd896329a4b8 (diff) | |
parent | 98eeb09e8acb6cbe0b0da3b1772b6676fe6d167f (diff) | |
download | git-079424a2cffa9c5a96c958ec50bb5a865a9305cf.tar.gz |
Merge branch 'mh/ref-races'
"git pack-refs" that races with new ref creation or deletion have
been susceptible to lossage of refs under right conditions, which
has been tightened up.
* mh/ref-races:
for_each_ref: load all loose refs before packed refs
get_packed_ref_cache: reload packed-refs file when it changes
add a stat_validity struct
Extract a struct stat_data from cache_entry
packed_ref_cache: increment refcount when locked
do_for_each_entry(): increment the packed refs cache refcount
refs: manage lifetime of packed refs cache via reference counting
refs: implement simple transactions for the packed-refs file
refs: wrap the packed refs cache in a level of indirection
pack_refs(): split creation of packed refs and entry writing
repack_without_ref(): split list curation and entry writing
Diffstat (limited to 'builtin/ls-files.c')
-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 87f3b331ca..3a410c35d9 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); } } |