commit: Show author if different from committer
[gitweb.git] / diff-lib.c
index 6e7ab29e343bd0aab10c54d5194527c233fa9e23..9139e45fb98b4cb62d4e9dd243d3dc45f631aaeb 100644 (file)
@@ -264,6 +264,9 @@ int setup_diff_no_index(struct rev_info *revs,
                        DIFF_OPT_SET(&revs->diffopt, EXIT_WITH_STATUS);
                        break;
                }
+       if (nongit && argc != i + 2)
+               die("git diff [--no-index] takes two paths");
+
        if (argc != i + 2 || (!is_outside_repo(argv[i + 1], nongit, prefix) &&
                                !is_outside_repo(argv[i], nongit, prefix)))
                return -1;