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
@ -467,7 +467,7 @@ int cmd_whatchanged(int argc, const char **argv, const char *prefix)
|
||||
init_log_defaults();
|
||||
git_config(git_log_config, NULL);
|
||||
|
||||
init_revisions(&rev, prefix);
|
||||
repo_init_revisions(the_repository, &rev, prefix);
|
||||
rev.diff = 1;
|
||||
rev.simplify_history = 0;
|
||||
memset(&opt, 0, sizeof(opt));
|
||||
@ -585,7 +585,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)
|
||||
git_config(git_log_config, NULL);
|
||||
|
||||
memset(&match_all, 0, sizeof(match_all));
|
||||
init_revisions(&rev, prefix);
|
||||
repo_init_revisions(the_repository, &rev, prefix);
|
||||
rev.diff = 1;
|
||||
rev.always_show_header = 1;
|
||||
rev.no_walk = REVISION_WALK_NO_WALK_SORTED;
|
||||
@ -665,7 +665,7 @@ int cmd_log_reflog(int argc, const char **argv, const char *prefix)
|
||||
init_log_defaults();
|
||||
git_config(git_log_config, NULL);
|
||||
|
||||
init_revisions(&rev, prefix);
|
||||
repo_init_revisions(the_repository, &rev, prefix);
|
||||
init_reflog_walk(&rev.reflog_info);
|
||||
rev.verbose_header = 1;
|
||||
memset(&opt, 0, sizeof(opt));
|
||||
@ -704,7 +704,7 @@ int cmd_log(int argc, const char **argv, const char *prefix)
|
||||
init_log_defaults();
|
||||
git_config(git_log_config, NULL);
|
||||
|
||||
init_revisions(&rev, prefix);
|
||||
repo_init_revisions(the_repository, &rev, prefix);
|
||||
rev.always_show_header = 1;
|
||||
memset(&opt, 0, sizeof(opt));
|
||||
opt.def = "HEAD";
|
||||
@ -917,7 +917,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids)
|
||||
init_patch_ids(the_repository, ids);
|
||||
|
||||
/* given a range a..b get all patch ids for b..a */
|
||||
init_revisions(&check_rev, rev->prefix);
|
||||
repo_init_revisions(the_repository, &check_rev, rev->prefix);
|
||||
check_rev.max_parents = 1;
|
||||
o1->flags ^= UNINTERESTING;
|
||||
o2->flags ^= UNINTERESTING;
|
||||
@ -1367,7 +1367,7 @@ static void prepare_bases(struct base_tree_info *bases,
|
||||
|
||||
oidcpy(&bases->base_commit, &base->object.oid);
|
||||
|
||||
init_revisions(&revs, NULL);
|
||||
repo_init_revisions(the_repository, &revs, NULL);
|
||||
revs.max_parents = 1;
|
||||
revs.topo_order = 1;
|
||||
for (i = 0; i < total; i++) {
|
||||
@ -1528,7 +1528,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
||||
extra_cc.strdup_strings = 1;
|
||||
init_log_defaults();
|
||||
git_config(git_format_config, NULL);
|
||||
init_revisions(&rev, prefix);
|
||||
repo_init_revisions(the_repository, &rev, prefix);
|
||||
rev.commit_format = CMIT_FMT_EMAIL;
|
||||
rev.expand_tabs_in_log_default = 0;
|
||||
rev.verbose_header = 1;
|
||||
@ -1939,7 +1939,7 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)
|
||||
}
|
||||
}
|
||||
|
||||
init_revisions(&revs, prefix);
|
||||
repo_init_revisions(the_repository, &revs, prefix);
|
||||
revs.max_parents = 1;
|
||||
|
||||
if (add_pending_commit(head, &revs, 0))
|
||||
|
||||
Reference in New Issue
Block a user