diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-03-07 01:59:51 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-03-07 01:59:51 +0100 |
commit | 7d0c1f4556ad89b2f7eae97d31ea85c3bfdf7c87 (patch) | |
tree | cce91296a436de34b3f81fe0ea4b433110ec69b5 /cache.h | |
parent | Merge tag 'l10n-2.21.0-rnd2.1' of git://github.com/git-l10n/git-po (diff) | |
parent | revert "checkout: introduce checkout.overlayMode config" (diff) | |
download | git-7d0c1f4556ad89b2f7eae97d31ea85c3bfdf7c87.tar.xz git-7d0c1f4556ad89b2f7eae97d31ea85c3bfdf7c87.zip |
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.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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; |