From: David Turner Date: Mon, 17 Nov 2014 19:31:04 GMT Subject: Re: [PATCH v2 01/22] dir.c: optionally compute sha-1 of a .gitignore file Message-ID: <1416252664.9065.3.camel@leckie> In-Reply-To: <1415439595-469-2-git-send-email-pclouds@gmail.com> On Sat, 2014-11-08 at 16:39 +0700, Nguyễn Thái Ngọc Duy wrote: > + * If "ss" is not NULL, compute SHA-1 of the exclude file and fill > + * stat data from disk (only valid if add_excludes returns zero). If > + * ss_valid is non-zero, "ss" must contain good value as input. ss and ss_valid should be sha1_stat and sha1_stat.valid > +struct sha1_stat { > + struct stat_data stat; > + unsigned char sha1[20]; > + int valid; > +}; It might be good to document what "valid" means here e.g. "a sha1_stat is valid if both sha1 and stat_data match the working tree's version of the file" or whatever.