s->show_untracked_files = SHOW_NORMAL_UNTRACKED_FILES;
s->use_color = GIT_COLOR_UNKNOWN;
s->relative_paths = 1;
- s->branch = refs_resolve_refdup(get_main_ref_store(the_repository),
+ s->branch = refs_resolve_refdup(get_main_ref_store(r),
"HEAD", 0, NULL, NULL);
s->reference = "HEAD";
s->fp = stdout;
- s->index_file = repo_get_index_file(the_repository);
+ s->index_file = repo_get_index_file(r);
s->change.strdup_strings = 1;
s->untracked.strdup_strings = 1;
s->ignored.strdup_strings = 1;
repo_init_revisions(s->repo, &rev, NULL);
memset(&opt, 0, sizeof(opt));
- opt.def = s->is_initial ? empty_tree_oid_hex(the_repository->hash_algo) : s->reference;
+ opt.def = s->is_initial ? empty_tree_oid_hex(s->repo->hash_algo) : s->reference;
setup_revisions(0, NULL, &rev, &opt);
rev.diffopt.flags.override_submodule_config = 1;
rev.diffopt.ita_invisible_in_index = 1;
memset(&opt, 0, sizeof(opt));
- opt.def = s->is_initial ? empty_tree_oid_hex(the_repository->hash_algo) : s->reference;
+ opt.def = s->is_initial ? empty_tree_oid_hex(s->repo->hash_algo) : s->reference;
setup_revisions(0, NULL, &rev, &opt);
rev.diffopt.output_format |= DIFF_FORMAT_PATCH;
!s->branch || strcmp(s->branch, "HEAD"))
return 0;
- if (refs_read_ref_full(get_main_ref_store(the_repository), "HEAD", RESOLVE_REF_READING | RESOLVE_REF_NO_RECURSE,
+ if (refs_read_ref_full(get_main_ref_store(s->repo), "HEAD", RESOLVE_REF_READING | RESOLVE_REF_NO_RECURSE,
&head_oid, &head_flags) ||
- refs_read_ref_full(get_main_ref_store(the_repository), "ORIG_HEAD", RESOLVE_REF_READING | RESOLVE_REF_NO_RECURSE,
+ refs_read_ref_full(get_main_ref_store(s->repo), "ORIG_HEAD", RESOLVE_REF_READING | RESOLVE_REF_NO_RECURSE,
&orig_head_oid, &orig_head_flags))
return 0;
if (head_flags & REF_ISSYMREF || orig_head_flags & REF_ISSYMREF)
i++)
status_printf_ln(s, color, " %s", have_done.items[i].string);
if (have_done.nr > nr_lines_to_show && s->hints) {
- char *path = repo_git_path(the_repository, "rebase-merge/done");
+ char *path = repo_git_path(s->repo, "rebase-merge/done");
status_printf_ln(s, color,
_(" (see more in file %s)"), path);
free(path);
else
status_printf_ln(s, color,
_("You are currently cherry-picking commit %s."),
- repo_find_unique_abbrev(the_repository, &s->state.cherry_pick_head_oid,
+ repo_find_unique_abbrev(s->repo, &s->state.cherry_pick_head_oid,
DEFAULT_ABBREV));
if (s->hints) {
else
status_printf_ln(s, color,
_("You are currently reverting commit %s."),
- repo_find_unique_abbrev(the_repository, &s->state.revert_head_oid,
+ repo_find_unique_abbrev(s->repo, &s->state.revert_head_oid,
DEFAULT_ABBREV));
if (s->hints) {
if (has_unmerged(s))
char *ref = NULL;
strbuf_init(&cb.buf, 0);
- if (refs_for_each_reflog_ent_reverse(get_main_ref_store(the_repository), "HEAD", grab_1st_switch, &cb) <= 0) {
+ if (refs_for_each_reflog_ent_reverse(get_main_ref_store(r), "HEAD", grab_1st_switch, &cb) <= 0) {
strbuf_release(&cb.buf);
return;
}
upstream_is_gone = 1;
}
- short_base = refs_shorten_unambiguous_ref(get_main_ref_store(the_repository),
+ short_base = refs_shorten_unambiguous_ref(get_main_ref_store(s->repo),
base, 0);
color_fprintf(s->fp, header_color, "...");
color_fprintf(s->fp, branch_color_remote, "%s", short_base);
ab_info = stat_tracking_info(branch, &nr_ahead, &nr_behind,
&base, 0, s->ahead_behind_flags);
if (base) {
- base = refs_shorten_unambiguous_ref(get_main_ref_store(the_repository),
+ base = refs_shorten_unambiguous_ref(get_main_ref_store(s->repo),
base, 0);
fprintf(s->fp, "# branch.upstream %s%c", base, eol);
free((char *)base);