Merge branch 'jk/pending-keep-tag-name'
[gitweb.git] / diff-lib.c
index 0d8c5358e4236bf1d0c2ceb214d6a4fa09b2d2de..bc49c708c1854a0f67c25e4fd2b77a9ad50ff511 100644 (file)
@@ -212,11 +212,6 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
                                               ce->sha1, !is_null_sha1(ce->sha1),
                                               ce->name, 0);
                                continue;
-                       } else if (ce->ce_flags & CE_INTENT_TO_ADD) {
-                               diff_addremove(&revs->diffopt, '+', ce->ce_mode,
-                                              EMPTY_BLOB_SHA1_BIN, 0,
-                                              ce->name, 0);
-                               continue;
                        }
 
                        changed = match_stat_with_submodule(&revs->diffopt, ce, &st,
@@ -381,13 +376,6 @@ 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 (idx && (idx->ce_flags & CE_INTENT_TO_ADD)) {
-               idx = NULL;
-               if (!tree)
-                       return; /* nothing to diff.. */
-       }
-
        /* if the entry is not checked out, don't examine work tree */
        cached = o->index_only ||
                (idx && ((idx->ce_flags & CE_VALID) || ce_skip_worktree(idx)));
@@ -505,7 +493,7 @@ int run_diff_index(struct rev_info *revs, int cached)
        struct object_array_entry *ent;
 
        ent = revs->pending.objects;
-       if (diff_cache(revs, ent->item->sha1, ent->name, cached))
+       if (diff_cache(revs, ent->item->oid.hash, ent->name, cached))
                exit(128);
 
        diff_set_mnemonic_prefix(&revs->diffopt, "c/", cached ? "i/" : "w/");