• David Turner's avatar
    commit: don't rewrite shared index unnecessarily · 475a3445
    David Turner authored
    Remove a cache invalidation which would cause the shared index to be
    rewritten on as-is commits.
    When the cache-tree has changed, we need to update it.  But we don't
    necessarily need to update the shared index.  So setting
    active_cache_changed to SOMETHING_CHANGED is unnecessary.  Instead, we
    let update_main_cache_tree just update the CACHE_TREE_CHANGED bit.
    In order to test this, make test-dump-split-index not segfault on
    missing replace_bitmap/delete_bitmap.  This new codepath is not called
    now that the test passes, but is necessary to avoid a segfault when the
    new test is run with the old builtin/commit.c code.
    Signed-off-by: default avatarDavid Turner <dturner@twopensource.com>
    Acked-by: Duy Nguyen's avatarNguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
t0090-cache-tree.sh 5.27 KB