summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-08 01:47:33 -0700
committerJunio C Hamano <gitster@pobox.com>2011-05-09 11:58:19 -0700
commitc4ce46fc7ac1b59372aa935e641ca15b12359f5b (patch)
tree000be1d69bef6c7129bdc97568d441e6b8e6615a /cache.h
parent9cedd16c62e12521f35b44e10bba80bfe261e69c (diff)
downloadgit-c4ce46fc7ac1b59372aa935e641ca15b12359f5b.tar.gz
index_fd(): turn write_object and format_check arguments into one flag
The "format_check" parameter tucked after the existing parameters is too ugly an afterthought to live in any reasonable API. Combine it with the other boolean parameter "write_object" into a single "flags" parameter. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index 28899b7b78..bc38013959 100644
--- a/cache.h
+++ b/cache.h
@@ -518,8 +518,11 @@ struct pathspec {
extern int init_pathspec(struct pathspec *, const char **);
extern void free_pathspec(struct pathspec *);
extern int ce_path_match(const struct cache_entry *ce, const struct pathspec *pathspec);
-extern int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object, enum object_type type, const char *path, int format_check);
-extern int index_path(unsigned char *sha1, const char *path, struct stat *st, int write_object);
+
+#define HASH_WRITE_OBJECT 1
+#define HASH_FORMAT_CHECK 2
+extern int index_fd(unsigned char *sha1, int fd, struct stat *st, enum object_type type, const char *path, unsigned flags);
+extern int index_path(unsigned char *sha1, const char *path, struct stat *st, unsigned flags);
extern void fill_stat_cache_info(struct cache_entry *ce, struct stat *st);
#define REFRESH_REALLY 0x0001 /* ignore_valid */