Re: [PATCH 09/16] Read index-v5
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Aug 2, 2012, 12:45 UTC
- Message-ID
- <CACsJy8Co8warnQg+fKmXnO_wt=dTPBjRRe+Apic6-GBrTr_3rg@mail.gmail.com>
- In-Reply-To
- <1343905326-23790-10-git-send-email-t.gummerer@gmail.com>
General note. I wonder if we should create a separate source file for v5 (at least the low level handling part). Partial reading/writing will come (hopefully soon) and read-cache.c on master is already close to 2000 lines.
On Thu, Aug 2, 2012 at 6:01 PM, Thomas Gummerer <t.gummerer@gmail.com> wrote:
Show 10 quoted lines
> +static struct cache_entry *cache_entry_from_ondisk_v5(struct ondisk_cache_entry_v5 *ondisk,
> + struct directory_entry *de,
> + char *name,
> + size_t len,
> + size_t prefix_len)
> +{
> + struct cache_entry *ce = xmalloc(cache_entry_size(len + de->de_pathlen));
> + int flags;
> +
> + flags = ntoh_s(ondisk->flags);huh? ntoh_s (and ntoh_l below)? search/replace problem?
> + ce->ce_ctime.sec = 0; > + ce->ce_mtime.sec = ntoh_l(ondisk->mtime.sec);
-- Duy