summaryrefslogtreecommitdiff
path: root/read-cache-ll.h
diff options
context:
space:
mode:
Diffstat (limited to 'read-cache-ll.h')
-rw-r--r--read-cache-ll.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/read-cache-ll.h b/read-cache-ll.h
index 9a1a7edc5a..71b49d9af4 100644
--- a/read-cache-ll.h
+++ b/read-cache-ll.h
@@ -1,7 +1,7 @@
#ifndef READ_CACHE_LL_H
#define READ_CACHE_LL_H
-#include "hash-ll.h"
+#include "hash.h"
#include "hashmap.h"
#include "statinfo.h"
@@ -151,7 +151,7 @@ enum sparse_index_mode {
/*
* The index has already been collapsed to sparse directories
- * whereever possible.
+ * wherever possible.
*/
INDEX_COLLAPSED,
@@ -196,7 +196,7 @@ struct index_state {
*
* If the variable won't be used again, use release_index() to free()
* its resources. If it needs to be used again use discard_index(),
- * which does the same thing, but will use use index_state_init() at
+ * which does the same thing, but will use index_state_init() at
* the end. The discard_index() will use its own "istate->repo" as the
* "r" argument to index_state_init() in that case.
*/
@@ -436,6 +436,14 @@ int match_stat_data_racy(const struct index_state *istate,
void fill_stat_cache_info(struct index_state *istate, struct cache_entry *ce, struct stat *st);
+/*
+ * Fill members of st by members of sd enough to convince match_stat()
+ * to consider that they match. It should be usable as a replacement
+ * for lstat() for a tracked path that is known to be up-to-date via
+ * some out-of-line means (like fsmonitor).
+ */
+int fake_lstat(const struct cache_entry *ce, struct stat *st);
+
#define REFRESH_REALLY (1 << 0) /* ignore_valid */
#define REFRESH_UNMERGED (1 << 1) /* allow unmerged */
#define REFRESH_QUIET (1 << 2) /* be quiet about it */
@@ -472,8 +480,8 @@ extern int verify_ce_order;
int cmp_cache_name_compare(const void *a_, const void *b_);
int add_files_to_cache(struct repository *repo, const char *prefix,
- const struct pathspec *pathspec, int include_sparse,
- int flags);
+ const struct pathspec *pathspec, char *ps_matched,
+ int include_sparse, int flags);
void overlay_tree_on_index(struct index_state *istate,
const char *tree_name, const char *prefix);