From b4e1e4a787d3771f617182b3344dcdd9224bd0cb Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 9 Feb 2007 18:51:40 -0800 Subject: 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 --- builtin-diff-files.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'builtin-diff-files.c') diff --git a/builtin-diff-files.c b/builtin-diff-files.c index 5d4a5c5828..3ee26059fc 100644 --- a/builtin-diff-files.c +++ b/builtin-diff-files.c @@ -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); } -- cgit v1.2.1