diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2021-09-08 01:42:29 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-07 22:41:09 -0700 |
commit | 8a96b9d0a7c85a25e3550a14e5403eb95aca6d37 (patch) | |
tree | f18887afeda86f4d7dd9ca9c3cbfd0d5a7632230 /dir.c | |
parent | sparse-index: silently return when cache tree fails (diff) | |
download | tgif-8a96b9d0a7c85a25e3550a14e5403eb95aca6d37.tar.xz |
sparse-index: use WRITE_TREE_MISSING_OK
When updating the cache tree in convert_to_sparse(), the
WRITE_TREE_MISSING_OK flag indicates that trees might be computed that
do not already exist within the object database. This happens in cases
such as 'git add' creating new trees that it wants to store in
anticipation of a following 'git commit'. If this flag is not specified,
then it might trigger a promisor fetch or a failure due to the object
not existing locally.
Use WRITE_TREE_MISSING_OK during convert_to_sparse() to avoid these
possible reasons for the cache_tree_update() to fail.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
0 files changed, 0 insertions, 0 deletions