diff options
author | Victoria Dye <vdye@github.com> | 2022-03-01 20:24:29 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-01 12:36:01 -0800 |
commit | 749703924121b9eb2750b4313b2c769113c8b310 (patch) | |
tree | 203f2340d0d22de30932070c2b1a93ffcfcbf52a /t/t9154/svn.dump | |
parent | read-tree: integrate with sparse index (diff) | |
download | tgif-749703924121b9eb2750b4313b2c769113c8b310.tar.xz |
read-tree: narrow scope of index expansion for '--prefix'
When 'git read-tree' is provided with a prefix, expand the index only if the
prefix is equivalent to a sparse directory or contained within one. If the
index is not expanded in these cases, 'ce_in_traverse_path' will indicate
that the relevant sparse directory is not in the prefix/traverse path,
skipping past it and not unpacking the appropriate tree(s).
If the prefix is in-cone, its sparse subdirectories (if any) will be
traversed correctly without index expansion.
The behavior of 'git read-tree' with prefixes 1) inside of cone, 2) equal to
a sparse directory, and 3) inside a sparse directory are all tested as part
of the 't/t1092-sparse-checkout-compatibility.sh' test 'read-tree --prefix',
ensuring that the sparse index case works the way it did prior to this
change as well as matching non-sparse index sparse-checkout.
Helped-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9154/svn.dump')
0 files changed, 0 insertions, 0 deletions