diff --git a/builtin-diff-index.c b/builtin-diff-index.c
index 1958580d82e54ab5a5b1e054263eab7264c4bcb2..c42ef9a7a76e7d8f6bc25d593865b9343d4e74b5 100644 (file)
--- a/builtin-diff-index.c
+++ b/builtin-diff-index.c
* Make sure there is one revision (i.e. pending object),
* and there is no revision filtering parameters.
*/
- if (!rev.pending_objects || rev.pending_objects->next ||
+ if (rev.pending.nr != 1 ||
rev.max_count != -1 || rev.min_age != -1 || rev.max_age != -1)
usage(diff_cache_usage);
return run_diff_index(&rev, cached);