Subject: Re: [PATCH 01/19] dir.c: optionally compute sha-1 of a .gitignore file

From: Torsten Bögershausen <[email-masked]>
Date: Tue, 28 Oct 2014 18:37:17 +0100

On 2014-10-27 13.10, Nguyễn Thái Ngọc Duy wrote:
[]
Nice serious, I can imagine to test & benchmark it (so I assume there is a branch 
on github or so ?)
Another thing:
Can we switch the feature off?

It could be nice to benchmark with and without the cache on the command line,
and besides that we may want to switch it on or off, depending on the file system.
I think this can be easily done when reading and writing the index file.
(But may cost a config variable, core.dirmtime ??)

To my knowledge there is support for the mtime in SAMBA (and probably NFS),
but I can help to find out more.

> diff --git a/dir.c b/dir.c
> +static int add_excludes(const char *fname, const char *base, int baselen,
> +			struct exclude_list *el, int check_index,
> +			struct sha1_stat *ss, int ss_valid)
Cosmetic question: does it make sense to write

struct sha1_stat *sha1_stat
or 
struct sha1_stat *s_stat