git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	robin.rosenberg@dewire.com, srabbelier@gmail.com
Subject: Re: [PATCH] doc: technical details about the index file format
Date: Thu, 2 Sep 2010 10:56:10 +0200	[thread overview]
Message-ID: <AANLkTi=wESk38u1XSTL1rd2__eQzHfSuq-EbqooxmcVw@mail.gmail.com> (raw)
In-Reply-To: <1283351989-19426-1-git-send-email-pclouds@gmail.com>

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?)

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.
Still, using uint32_t (the POSIX types) in ondisk_cache_entry would be clearer
(unlikely alignment issues aside.

  reply	other threads:[~2010-09-02  8:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-01  9:53 [PATCH] doc: technical details about the index file format Nguyễn Thái Ngọc Duy
2010-09-01 10:36 ` Ramkumar Ramachandra
2010-09-01 15:20   ` Sverre Rabbelier
2010-09-01 18:54 ` Robin Rosenberg
2010-09-01 14:39   ` Nguyễn Thái Ngọc Duy
2010-09-02  8:56     ` Alex Riesen [this message]
2010-09-02  9:08       ` Joshua Juran
2010-09-02 14:50       ` Junio C Hamano
2010-09-02 15:11         ` Erik Faye-Lund
2010-09-06 10:37           ` Nguyễn Thái Ngọc Duy
2011-02-19 22:16             ` Sverre Rabbelier
2011-02-20  9:30               ` Nguyen Thai Ngoc Duy
2011-02-26 10:03                 ` Nguyen Thai Ngoc Duy
2011-02-26 10:23                   ` Junio C Hamano
2011-02-26 13:36                     ` Nguyen Thai Ngoc Duy
2011-03-02  1:51                       ` Junio C Hamano
2011-03-02  3:34                         ` Nguyen Thai Ngoc Duy
2011-03-02  6:02                           ` Junio C Hamano
2011-03-02 11:43                             ` Nguyen Thai Ngoc Duy
2011-03-02 12:53                             ` Drew Northup
2010-09-01 23:28   ` Nguyen Thai Ngoc Duy
2010-09-02  5:59   ` Robin Rosenberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=wESk38u1XSTL1rd2__eQzHfSuq-EbqooxmcVw@mail.gmail.com' \
    --to=raa.lkml@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=robin.rosenberg@dewire.com \
    --cc=srabbelier@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).