summaryrefslogtreecommitdiff
path: root/builtin-diff-index.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-diff-index.c')
-rw-r--r--builtin-diff-index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-diff-index.c b/builtin-diff-index.c
index 1958580..c42ef9a 100644
--- a/builtin-diff-index.c
+++ b/builtin-diff-index.c
@@ -32,7 +32,7 @@ int cmd_diff_index(int argc, const char **argv, char **envp)
* 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);