summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-03-07 00:59:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-07 00:59:51 (GMT)
commit7d0c1f4556ad89b2f7eae97d31ea85c3bfdf7c87 (patch)
treecce91296a436de34b3f81fe0ea4b433110ec69b5 /cache.h
parent36eb1cb9cfe327583128a4b0abdf9516c2ca815b (diff)
parente92aa0e4ef5a91781530449f9466a45c16c91f7f (diff)
downloadgit-7d0c1f4556ad89b2f7eae97d31ea85c3bfdf7c87.zip
git-7d0c1f4556ad89b2f7eae97d31ea85c3bfdf7c87.tar.gz
git-7d0c1f4556ad89b2f7eae97d31ea85c3bfdf7c87.tar.bz2
Merge branch 'tg/checkout-no-overlay'
"git checkout --no-overlay" can be used to trigger a new mode of checking out paths out of the tree-ish, that allows paths that match the pathspec that are in the current index and working tree and are not in the tree-ish. * tg/checkout-no-overlay: revert "checkout: introduce checkout.overlayMode config" checkout: introduce checkout.overlayMode config checkout: introduce --{,no-}overlay option checkout: factor out mark_cache_entry_for_checkout function checkout: clarify comment read-cache: add invalidate parameter to remove_marked_cache_entries entry: support CE_WT_REMOVE flag in checkout_entry entry: factor out unlink_entry function move worktree tests to t24*
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 27fe635..473fa1e 100644
--- a/cache.h
+++ b/cache.h
@@ -758,7 +758,7 @@ extern void rename_index_entry_at(struct index_state *, int pos, const char *new
/* Remove entry, return true if there are more entries to go. */
extern int remove_index_entry_at(struct index_state *, int pos);
-extern void remove_marked_cache_entries(struct index_state *istate);
+extern void remove_marked_cache_entries(struct index_state *istate, int invalidate);
extern int remove_file_from_index(struct index_state *, const char *path);
#define ADD_CACHE_VERBOSE 1
#define ADD_CACHE_PRETEND 2
@@ -1569,6 +1569,11 @@ struct checkout {
extern int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *topath, int *nr_checkouts);
extern void enable_delayed_checkout(struct checkout *state);
extern int finish_delayed_checkout(struct checkout *state, int *nr_checkouts);
+/*
+ * Unlink the last component and schedule the leading directories for
+ * removal, such that empty directories get removed.
+ */
+extern void unlink_entry(const struct cache_entry *ce);
struct cache_def {
struct strbuf path;