run_diff_{files,index}(): update calling convention.

They used to open and read index themselves, but they now expect
their callers to do so.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano
2007-02-09 18:51:40 -08:00
parent 7b802b86a6
commit b4e1e4a787
5 changed files with 27 additions and 11 deletions

View File

@ -47,5 +47,9 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix)
if (rev.pending.nr ||
rev.min_age != -1 || rev.max_age != -1)
usage(diff_files_usage);
if (read_cache() < 0) {
perror("read_cache");
return -1;
}
return run_diff_files(&rev, silent);
}