Merge branch 'nd/the-index'
Various codepaths in the core-ish part learn to work on an arbitrary in-core index structure, not necessarily the default instance "the_index". * nd/the-index: (23 commits) revision.c: reduce implicit dependency the_repository revision.c: remove implicit dependency on the_index ws.c: remove implicit dependency on the_index tree-diff.c: remove implicit dependency on the_index submodule.c: remove implicit dependency on the_index line-range.c: remove implicit dependency on the_index userdiff.c: remove implicit dependency on the_index rerere.c: remove implicit dependency on the_index sha1-file.c: remove implicit dependency on the_index patch-ids.c: remove implicit dependency on the_index merge.c: remove implicit dependency on the_index merge-blobs.c: remove implicit dependency on the_index ll-merge.c: remove implicit dependency on the_index diff-lib.c: remove implicit dependency on the_index read-cache.c: remove implicit dependency on the_index diff.c: remove implicit dependency on the_index grep.c: remove implicit dependency on the_index diff.c: remove the_index dependency in textconv() functions blame.c: rename "repo" argument to "r" combine-diff.c: remove implicit dependency on the_index ...
This commit is contained in:
@ -118,7 +118,7 @@ static int log_line_range_callback(const struct option *option, const char *arg,
|
||||
|
||||
static void init_log_defaults(void)
|
||||
{
|
||||
init_grep_defaults();
|
||||
init_grep_defaults(the_repository);
|
||||
init_diff_ui_defaults();
|
||||
|
||||
decoration_style = auto_decoration_style();
|
||||
@ -470,7 +470,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));
|
||||
@ -510,7 +510,8 @@ static int show_blob_object(const struct object_id *oid, struct rev_info *rev, c
|
||||
&oidc, &obj_context))
|
||||
die(_("Not a valid object name %s"), obj_name);
|
||||
if (!obj_context.path ||
|
||||
!textconv_object(obj_context.path, obj_context.mode, &oidc, 1, &buf, &size)) {
|
||||
!textconv_object(the_repository, obj_context.path,
|
||||
obj_context.mode, &oidc, 1, &buf, &size)) {
|
||||
free(obj_context.path);
|
||||
return stream_blob_to_fd(1, oid, NULL, 0);
|
||||
}
|
||||
@ -587,7 +588,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;
|
||||
@ -667,7 +668,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));
|
||||
@ -706,7 +707,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";
|
||||
@ -916,10 +917,10 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids)
|
||||
if ((flags1 & UNINTERESTING) == (flags2 & UNINTERESTING))
|
||||
die(_("Not a range."));
|
||||
|
||||
init_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;
|
||||
@ -1377,13 +1378,13 @@ static void prepare_bases(struct base_tree_info *bases,
|
||||
return;
|
||||
|
||||
init_commit_base(&commit_base);
|
||||
diff_setup(&diffopt);
|
||||
repo_diff_setup(the_repository, &diffopt);
|
||||
diffopt.flags.recursive = 1;
|
||||
diff_setup_done(&diffopt);
|
||||
|
||||
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++) {
|
||||
@ -1588,7 +1589,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;
|
||||
@ -2038,7 +2039,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