revision.c: remove implicit dependency on the_index
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
26d024ecf0
commit
2abf350385
10
wt-status.c
10
wt-status.c
@ -582,7 +582,7 @@ static void wt_status_collect_changes_worktree(struct wt_status *s)
|
||||
{
|
||||
struct rev_info rev;
|
||||
|
||||
init_revisions(&rev, NULL);
|
||||
repo_init_revisions(the_repository, &rev, NULL);
|
||||
setup_revisions(0, NULL, &rev, NULL);
|
||||
rev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;
|
||||
rev.diffopt.flags.dirty_submodules = 1;
|
||||
@ -607,7 +607,7 @@ static void wt_status_collect_changes_index(struct wt_status *s)
|
||||
struct rev_info rev;
|
||||
struct setup_revision_opt opt;
|
||||
|
||||
init_revisions(&rev, NULL);
|
||||
repo_init_revisions(the_repository, &rev, NULL);
|
||||
memset(&opt, 0, sizeof(opt));
|
||||
opt.def = s->is_initial ? empty_tree_oid_hex() : s->reference;
|
||||
setup_revisions(0, NULL, &rev, &opt);
|
||||
@ -982,7 +982,7 @@ static void wt_longstatus_print_verbose(struct wt_status *s)
|
||||
int dirty_submodules;
|
||||
const char *c = color(WT_STATUS_HEADER, s);
|
||||
|
||||
init_revisions(&rev, NULL);
|
||||
repo_init_revisions(the_repository, &rev, NULL);
|
||||
rev.diffopt.flags.allow_textconv = 1;
|
||||
rev.diffopt.ita_invisible_in_index = 1;
|
||||
|
||||
@ -2314,7 +2314,7 @@ int has_unstaged_changes(int ignore_submodules)
|
||||
struct rev_info rev_info;
|
||||
int result;
|
||||
|
||||
init_revisions(&rev_info, NULL);
|
||||
repo_init_revisions(the_repository, &rev_info, NULL);
|
||||
if (ignore_submodules) {
|
||||
rev_info.diffopt.flags.ignore_submodules = 1;
|
||||
rev_info.diffopt.flags.override_submodule_config = 1;
|
||||
@ -2336,7 +2336,7 @@ int has_uncommitted_changes(int ignore_submodules)
|
||||
if (is_cache_unborn())
|
||||
return 0;
|
||||
|
||||
init_revisions(&rev_info, NULL);
|
||||
repo_init_revisions(the_repository, &rev_info, NULL);
|
||||
if (ignore_submodules)
|
||||
rev_info.diffopt.flags.ignore_submodules = 1;
|
||||
rev_info.diffopt.flags.quick = 1;
|
||||
|
Reference in New Issue
Block a user