Merge branch 'jk/reopen-tempfile-truncate'
[gitweb.git] / diff-lib.c
index 88a98b1c06e8792136eced81a7da5f9aacb8542f..30bf9a2399fa392b31338489278e0363a55eb726 100644 (file)
@@ -342,7 +342,7 @@ static int show_modified(struct rev_info *revs,
        }
 
        if (revs->combine_merges && !cached &&
-           (oidcmp(oid, &old_entry->oid) || oidcmp(&old_entry->oid, &new_entry->oid))) {
+           (!oideq(oid, &old_entry->oid) || !oideq(&old_entry->oid, &new_entry->oid))) {
                struct combine_diff_path *p;
                int pathlen = ce_namelen(new_entry);
 
@@ -366,7 +366,7 @@ static int show_modified(struct rev_info *revs,
        }
 
        oldmode = old_entry->ce_mode;
-       if (mode == oldmode && !oidcmp(oid, &old_entry->oid) && !dirty_submodule &&
+       if (mode == oldmode && oideq(oid, &old_entry->oid) && !dirty_submodule &&
            !revs->diffopt.flags.find_copies_harder)
                return 0;
 
@@ -518,11 +518,11 @@ static int diff_cache(struct rev_info *revs,
 int run_diff_index(struct rev_info *revs, int cached)
 {
        struct object_array_entry *ent;
-       uint64_t start = getnanotime();
 
        if (revs->pending.nr != 1)
                BUG("run_diff_index must be passed exactly one tree");
 
+       trace_performance_enter();
        ent = revs->pending.objects;
        if (diff_cache(revs, &ent->item->oid, ent->name, cached))
                exit(128);
@@ -531,7 +531,7 @@ int run_diff_index(struct rev_info *revs, int cached)
        diffcore_fix_diff_index(&revs->diffopt);
        diffcore_std(&revs->diffopt);
        diff_flush(&revs->diffopt);
-       trace_performance_since(start, "diff-index");
+       trace_performance_leave("diff-index");
        return 0;
 }