summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-02-27 14:01:14 -0800
committerJunio C Hamano <gitster@pobox.com>2014-02-27 14:01:14 -0800
commit156d6ed9221ff38c4cd3bfcfc6778e31c104fd9b (patch)
treed1e4e06d6b9f304bc1ce2deacd555183131d2be1 /cache.h
parent7da5fd6895af9066ad4684e333c57f4086589c2f (diff)
parent6e2068ae48000a2dfdb2044bbb91073c11f6fbff (diff)
downloadgit-156d6ed9221ff38c4cd3bfcfc6778e31c104fd9b.tar.gz
Merge branch 'bk/refresh-missing-ok-in-merge-recursive'
Allow "merge-recursive" to work in an empty (temporary) working tree again when there are renames involved, correcting an old regression in 1.7.7 era. * bk/refresh-missing-ok-in-merge-recursive: merge-recursive.c: tolerate missing files while refreshing index read-cache.c: extend make_cache_entry refresh flag with options read-cache.c: refactor --ignore-missing implementation t3030-merge-recursive: test known breakage with empty work tree
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 21251598d0..4007aa8450 100644
--- a/cache.h
+++ b/cache.h
@@ -485,7 +485,7 @@ extern int remove_file_from_index(struct index_state *, const char *path);
#define ADD_CACHE_IMPLICIT_DOT 32 /* internal to "git add -u/-A" */
extern int add_to_index(struct index_state *, const char *path, struct stat *, int flags);
extern int add_file_to_index(struct index_state *, const char *path, int flags);
-extern struct cache_entry *make_cache_entry(unsigned int mode, const unsigned char *sha1, const char *path, int stage, int refresh);
+extern struct cache_entry *make_cache_entry(unsigned int mode, const unsigned char *sha1, const char *path, int stage, unsigned int refresh_options);
extern int ce_same_name(const struct cache_entry *a, const struct cache_entry *b);
extern int index_name_is_other(const struct index_state *, const char *, int);
extern void *read_blob_data_from_index(struct index_state *, const char *, unsigned long *);
@@ -496,6 +496,10 @@ extern void *read_blob_data_from_index(struct index_state *, const char *, unsig
#define CE_MATCH_RACY_IS_DIRTY 02
/* do stat comparison even if CE_SKIP_WORKTREE is true */
#define CE_MATCH_IGNORE_SKIP_WORKTREE 04
+/* ignore non-existent files during stat update */
+#define CE_MATCH_IGNORE_MISSING 0x08
+/* enable stat refresh */
+#define CE_MATCH_REFRESH 0x10
extern int ie_match_stat(const struct index_state *, const struct cache_entry *, struct stat *, unsigned int);
extern int ie_modified(const struct index_state *, const struct cache_entry *, struct stat *, unsigned int);