]> git.ipfire.org Git - thirdparty/git.git/blobdiff - diff-lib.c
t5318: avoid unnecessary command substitutions
[thirdparty/git.git] / diff-lib.c
index 104f954a25700a4eee95507e7ebb7734e94b67c6..a9f38eb5a3e0e17d111301b581d06876ce5fd510 100644 (file)
@@ -389,8 +389,12 @@ static void do_oneway_diff(struct unpack_trees_options *o,
        struct rev_info *revs = o->unpack_data;
        int match_missing, cached;
 
-       /* i-t-a entries do not actually exist in the index */
-       if (revs->diffopt.ita_invisible_in_index &&
+       /*
+        * i-t-a entries do not actually exist in the index (if we're
+        * looking at its content)
+        */
+       if (o->index_only &&
+           revs->diffopt.ita_invisible_in_index &&
            idx && ce_intent_to_add(idx)) {
                idx = NULL;
                if (!tree)