]> git.ipfire.org Git - thirdparty/git.git/commitdiff
add: remove ensure_full_index() with --renormalize
authorDerrick Stolee <dstolee@microsoft.com>
Thu, 29 Jul 2021 14:52:07 +0000 (14:52 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 29 Jul 2021 19:36:34 +0000 (12:36 -0700)
The --renormalize option updates the EOL conversions for the tracked
files. However, the loop already ignores files marked with the
SKIP_WORKTREE bit, so it will continue to do so with a sparse index
because the sparse directory entries also have this bit set.

Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/add.c

index d512ece655bce15b2d9a6494ab4bff887e6a9d67..c49e179abc36fa4fd180701402fa9cb9cf1764a9 100644 (file)
@@ -144,8 +144,6 @@ static int renormalize_tracked_files(const struct pathspec *pathspec, int flags)
 {
        int i, retval = 0;
 
-       /* TODO: audit for interaction with sparse-index. */
-       ensure_full_index(&the_index);
        for (i = 0; i < active_nr; i++) {
                struct cache_entry *ce = active_cache[i];