summaryrefslogtreecommitdiff
path: root/diff-lib.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-09 18:51:40 -0800
committerJunio C Hamano <junkio@cox.net>2007-02-22 02:02:15 -0800
commitb4e1e4a787d3771f617182b3344dcdd9224bd0cb (patch)
treedc41f0b5f98d8028440e83857a04d8f233faf617 /diff-lib.c
parent7b802b86a6734a47c964d84922af2a016d836882 (diff)
downloadgit-b4e1e4a787d3771f617182b3344dcdd9224bd0cb.tar.gz
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>
Diffstat (limited to 'diff-lib.c')
-rw-r--r--diff-lib.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/diff-lib.c b/diff-lib.c
index 91cd87742f..278ba79ee6 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -20,11 +20,7 @@ int run_diff_files(struct rev_info *revs, int silent_on_removed)
if (diff_unmerged_stage < 0)
diff_unmerged_stage = 2;
- entries = read_cache();
- if (entries < 0) {
- perror("read_cache");
- return -1;
- }
+ entries = active_nr;
for (i = 0; i < entries; i++) {
struct stat st;
unsigned int oldmode, newmode;
@@ -354,10 +350,6 @@ int run_diff_index(struct rev_info *revs, int cached)
if (!revs->ignore_merges)
match_missing = 1;
- if (read_cache() < 0) {
- perror("read_cache");
- return -1;
- }
mark_merge_entries();
ent = revs->pending.objects[0].item;