Commit 1e0a3718b1131a9aac753d87c863ef437f73eabc

Stefan Sperling 2020-07-23T14:22:35

reserve some file entry mode bits for a staged file type

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/lib/got_lib_fileindex.h b/lib/got_lib_fileindex.h
index 31f1e04..3b31707 100644
--- a/lib/got_lib_fileindex.h
+++ b/lib/got_lib_fileindex.h
@@ -37,6 +37,9 @@ struct got_fileindex_entry {
 
 	uint16_t mode;
 #define GOT_FILEIDX_MODE_FILE_TYPE	0x000f
+#define GOT_FILEIDX_MODE_FILE_TYPE_ONDISK	0x0003
+#define GOT_FILEIDX_MODE_FILE_TYPE_STAGED	0x000c
+#define GOT_FILEIDX_MODE_FILE_TYPE_STAGED_SHIFT	2
 #define GOT_FILEIDX_MODE_REGULAR_FILE	1
 #define GOT_FILEIDX_MODE_SYMLINK	2
 #define GOT_FILEIDX_MODE_BAD_SYMLINK	3