diff options
author | Junio C Hamano <junkio@cox.net> | 2007-02-09 18:51:40 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-02-22 02:02:15 -0800 |
commit | b4e1e4a787d3771f617182b3344dcdd9224bd0cb (patch) | |
tree | dc41f0b5f98d8028440e83857a04d8f233faf617 /wt-status.c | |
parent | 7b802b86a6734a47c964d84922af2a016d836882 (diff) | |
download | git-b4e1e4a787d3771f617182b3344dcdd9224bd0cb.tar.gz git-b4e1e4a787d3771f617182b3344dcdd9224bd0cb.tar.xz |
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 'wt-status.c')
-rw-r--r-- | wt-status.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/wt-status.c b/wt-status.c index 2879c3d5e..e34651115 100644 --- a/wt-status.c +++ b/wt-status.c @@ -191,12 +191,18 @@ static void wt_status_print_changed_cb(struct diff_queue_struct *q, wt_status_print_trailer(); } +static void wt_read_cache(struct wt_status *s) +{ + discard_cache(); + read_cache(); +} + void wt_status_print_initial(struct wt_status *s) { int i; char buf[PATH_MAX]; - read_cache(); + wt_read_cache(s); if (active_nr) { s->commitable = 1; wt_status_print_cached_header(NULL); @@ -220,6 +226,7 @@ static void wt_status_print_updated(struct wt_status *s) rev.diffopt.format_callback = wt_status_print_updated_cb; rev.diffopt.format_callback_data = s; rev.diffopt.detect_rename = 1; + wt_read_cache(s); run_diff_index(&rev, 1); } @@ -231,6 +238,7 @@ static void wt_status_print_changed(struct wt_status *s) rev.diffopt.output_format |= DIFF_FORMAT_CALLBACK; rev.diffopt.format_callback = wt_status_print_changed_cb; rev.diffopt.format_callback_data = s; + wt_read_cache(s); run_diff_files(&rev, 0); } @@ -287,6 +295,7 @@ static void wt_status_print_verbose(struct wt_status *s) setup_revisions(0, NULL, &rev, s->reference); rev.diffopt.output_format |= DIFF_FORMAT_PATCH; rev.diffopt.detect_rename = 1; + wt_read_cache(s); run_diff_index(&rev, 1); } @@ -316,7 +325,6 @@ void wt_status_print(struct wt_status *s) } else { wt_status_print_updated(s); - discard_cache(); } wt_status_print_changed(s); |