diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-12-10 14:35:12 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-12-10 14:35:12 -0800 |
| commit | f0850875fd44a58cd1eae349244327b2eff29fa7 (patch) | |
| tree | 184c87add4c1e39e25a289f6aed8199215e52fa6 /cache.h | |
| parent | Merge branch 'tl/midx-docfix' (diff) | |
| parent | unpack-trees: improve performance of next_cache_entry (diff) | |
| download | git-f0850875fd44a58cd1eae349244327b2eff29fa7.tar.gz git-f0850875fd44a58cd1eae349244327b2eff29fa7.zip | |
Merge branch 'vd/sparse-reset'
Various operating modes of "git reset" have been made to work
better with the sparse index.
* vd/sparse-reset:
unpack-trees: improve performance of next_cache_entry
reset: make --mixed sparse-aware
reset: make sparse-aware (except --mixed)
reset: integrate with sparse index
reset: expand test coverage for sparse checkouts
sparse-index: update command for expand/collapse test
reset: preserve skip-worktree bit in mixed reset
reset: rename is_missing to !is_in_reset_tree
Diffstat (limited to 'cache.h')
| -rw-r--r-- | cache.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -817,6 +817,16 @@ struct cache_entry *index_file_exists(struct index_state *istate, const char *na int index_name_pos(struct index_state *, const char *name, int namelen); /* + * Determines whether an entry with the given name exists within the + * given index. The return value is 1 if an exact match is found, otherwise + * it is 0. Note that, unlike index_name_pos, this function does not expand + * the index if it is sparse. If an item exists within the full index but it + * is contained within a sparse directory (and not in the sparse index), 0 is + * returned. + */ +int index_entry_exists(struct index_state *, const char *name, int namelen); + +/* * Some functions return the negative complement of an insert position when a * precise match was not found but a position was found where the entry would * need to be inserted. This helper protects that logic from any integer |
