Merge branch 'kg/gc-auto-windows-workaround'
[gitweb.git] / diff-lib.c
index a9f38eb5a3e0e17d111301b581d06876ce5fd510..732f684a49c54cdbc3b9708e91c064b7845d7716 100644 (file)
@@ -520,6 +520,9 @@ 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");
+
        ent = revs->pending.objects;
        if (diff_cache(revs, &ent->item->oid, ent->name, cached))
                exit(128);