Re: [PATCH 2/2] Add index-v5
- From
Thomas Gummerer <t.gummerer@gmail.com>
- Date
- Aug 8, 2012, 10:54 UTC
- Message-ID
- <20120808105403.GA884@tgummerer.unibz.it>
- In-Reply-To
- <50218E16.1010304@dewire.com>
On 08/07, Robin Rosenberg wrote:
Show 29 quoted lines
> Nguyễn Thái Ngọc Duy skrev 2012-08-06 16.36:
>
> >+++ b/read-cache-v5.c
> >@@ -0,0 +1,1170 @@
> >+#include "cache.h"
> >+#include "read-cache.h"
> >+#include "resolve-undo.h"
> >+#include "cache-tree.h"
> >+
> >+struct cache_header_v5 {
> >+ unsigned int hdr_ndir;
> >+ unsigned int hdr_nfile;
> >+ unsigned int hdr_fblockoffset;
> >+ unsigned int hdr_nextension;
> >+};
> >+
> >+struct ondisk_cache_entry_v5 {
> >+ unsigned short flags;
> >+ unsigned short mode;
> >+ struct cache_time mtime;
> >+ int stat_crc;
> >+ unsigned char sha1[20];
> >+};
>
> I mentioned this before in another thread, but for JGit I'd like
> to see size as a separate attribute. The rest of stat_crc is not
> available to Java so when this index gets its way into JGit,
> stat_crc will be zero and will never be checked.
> I'm sorry for forgetting to add this, it will be included in the re-roll. The stat_crc will be ignored if it is 0 in the ondisk index.