diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-08-18 13:07:04 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-08-18 13:07:04 -0700 |
| commit | 80ffc849bdd5ed111a2ec070856ef67e075572c6 (patch) | |
| tree | e40b7bd0e84ae6ea1fdd5066ef6c42cf98e3ecfc /read-cache.c | |
| parent | 0d133a3dcf43eb0396a5899008a4ff4ceaeb0d6e (diff) | |
| parent | b15207b8cf1a1930fe5eb076c08c6ddc92d9282d (diff) | |
| download | git-80ffc849bdd5ed111a2ec070856ef67e075572c6.tar.gz | |
Merge branch 'vd/sparse-reset-checkout-fixes'
Fixes to sparse index compatibility work for "reset" and "checkout"
commands.
* vd/sparse-reset-checkout-fixes:
unpack-trees: unpack new trees as sparse directories
cache.h: create 'index_name_pos_sparse()'
oneway_diff: handle removed sparse directories
checkout: fix nested sparse directory diff in sparse index
Diffstat (limited to 'read-cache.c')
| -rw-r--r-- | read-cache.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/read-cache.c b/read-cache.c index 4de207752d..b09128b188 100644 --- a/read-cache.c +++ b/read-cache.c @@ -620,6 +620,11 @@ int index_name_pos(struct index_state *istate, const char *name, int namelen) return index_name_stage_pos(istate, name, namelen, 0, EXPAND_SPARSE); } +int index_name_pos_sparse(struct index_state *istate, const char *name, int namelen) +{ + return index_name_stage_pos(istate, name, namelen, 0, NO_EXPAND_SPARSE); +} + int index_entry_exists(struct index_state *istate, const char *name, int namelen) { return index_name_stage_pos(istate, name, namelen, 0, NO_EXPAND_SPARSE) >= 0; |
