Re: [PATCH] doc: technical details about the index file format
- From
- Joshua Juran <jjuran@gmail.com>
- Date
- Sep 2, 2010, 09:08 UTC
- Message-ID
- <E4DDD4F7-FEDB-49CE-9515-90D64B66D7D3@gmail.com>
- In-Reply-To
- <AANLkTi=wESk38u1XSTL1rd2__eQzHfSuq-EbqooxmcVw@mail.gmail.com>
On Sep 2, 2010, at 1:56 AM, Alex Riesen wrote:
Show 18 quoted lines
> 2010/9/1 Nguyễn Thái Ngọc Duy <pclouds@gmail.com>: >> +== Index entry >> + >> + Index entries are sorted in ascending order on the name field, >> + interpreted as a string of unsigned bytes. Entries with the same >> + name are sorted by their stage field. >> + >> + 32-bit ctime seconds, the last time a file's metadata changed >> + this is stat(2) data >> + >> + 32-bit ctime nanoseconds (modulo 1G) >> + this is stat(2) data > > Maybe I'm missing something, but I failed to find where "modulo 1G" > comes from. > AFAICS (read-cache.c), the stat data are saved almost unmodified > (casted to unsigned int). > (BTW, is 1G the Gravitational Constant or what?)
G stands for "giga-" meaning one billion, so 1G refers to one billion nanoseconds.
> I'm not sure it is safe to assume that every system Git will be > ported to defines > "unsigned int" to be 32 bits. OTOH, never met one where it is > something else.
DOS and early Mac compilers have used 16-bit ints, but I don't think anyone cares.
Josh