aboutsummaryrefslogtreecommitdiffstats
path: root/dir.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2015-03-08 17:12:24 +0700
committerJunio C Hamano <gitster@pobox.com>2015-03-12 13:45:08 -0700
commit55fe6f51f41f254d3d87994d18bff04664aa013b (patch)
treeacfff44d68b75fb5b6a7b0b5d40f2fd23a74e35a /dir.h
parent7a9409cb0104466eba32162f5bc4e5ab46130f02 (diff)
downloadgit-55fe6f51f41f254d3d87994d18bff04664aa013b.tar.gz
dir.c: optionally compute sha-1 of a .gitignore file
This is not used anywhere yet. But the goal is to compare quickly if a .gitignore file has changed when we have the SHA-1 of both old (cached somewhere) and new (from index or a tree) versions. Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.h')
-rw-r--r--dir.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/dir.h b/dir.h
index 6c45e9d4b9..cdca71b3b0 100644
--- a/dir.h
+++ b/dir.h
@@ -73,6 +73,12 @@ struct exclude_list_group {
struct exclude_list *el;
};
+struct sha1_stat {
+ struct stat_data stat;
+ unsigned char sha1[20];
+ int valid;
+};
+
struct dir_struct {
int nr, alloc;
int ignored_nr, ignored_alloc;