150
s->show_untracked_files = SHOW_NORMAL_UNTRACKED_FILES;
151
s->use_color = GIT_COLOR_UNKNOWN;
152
s->relative_paths = 1;
153
- s->branch = refs_resolve_refdup(get_main_ref_store(the_repository),
153
+ s->branch = refs_resolve_refdup(get_main_ref_store(r),
154
"HEAD", 0, NULL, NULL);
155
s->reference = "HEAD";
156
s->fp = stdout;
157
- s->index_file = repo_get_index_file(the_repository);
157
+ s->index_file = repo_get_index_file(r);
158
s->change.strdup_strings = 1;
159
s->untracked.strdup_strings = 1;
160
s->ignored.strdup_strings = 1;
646
647
repo_init_revisions(s->repo, &rev, NULL);
648
memset(&opt, 0, sizeof(opt));
649
- opt.def = s->is_initial ? empty_tree_oid_hex(the_repository->hash_algo) : s->reference;
649
+ opt.def = s->is_initial ? empty_tree_oid_hex(s->repo->hash_algo) : s->reference;
650
setup_revisions(0, NULL, &rev, &opt);
651
652
rev.diffopt.flags.override_submodule_config = 1;
1146
rev.diffopt.ita_invisible_in_index = 1;
1147
1148
memset(&opt, 0, sizeof(opt));
1149
- opt.def = s->is_initial ? empty_tree_oid_hex(the_repository->hash_algo) : s->reference;
1149
+ opt.def = s->is_initial ? empty_tree_oid_hex(s->repo->hash_algo) : s->reference;
1150
setup_revisions(0, NULL, &rev, &opt);
1151
1152
rev.diffopt.output_format |= DIFF_FORMAT_PATCH;
1317
!s->branch || strcmp(s->branch, "HEAD"))
1318
return 0;
1319
1320
- if (refs_read_ref_full(get_main_ref_store(the_repository), "HEAD", RESOLVE_REF_READING | RESOLVE_REF_NO_RECURSE,
1320
+ if (refs_read_ref_full(get_main_ref_store(s->repo), "HEAD", RESOLVE_REF_READING | RESOLVE_REF_NO_RECURSE,
1321
&head_oid, &head_flags) ||
1322
- refs_read_ref_full(get_main_ref_store(the_repository), "ORIG_HEAD", RESOLVE_REF_READING | RESOLVE_REF_NO_RECURSE,
1322
+ refs_read_ref_full(get_main_ref_store(s->repo), "ORIG_HEAD", RESOLVE_REF_READING | RESOLVE_REF_NO_RECURSE,
1323
&orig_head_oid, &orig_head_flags))
1324
return 0;
1325
if (head_flags & REF_ISSYMREF || orig_head_flags & REF_ISSYMREF)
1432
i++)
1433
status_printf_ln(s, color, " %s", have_done.items[i].string);
1434
if (have_done.nr > nr_lines_to_show && s->hints) {
1435
- char *path = repo_git_path(the_repository, "rebase-merge/done");
1435
+ char *path = repo_git_path(s->repo, "rebase-merge/done");
1436
status_printf_ln(s, color,
1437
_(" (see more in file %s)"), path);
1438
free(path);
1534
else
1535
status_printf_ln(s, color,
1536
_("You are currently cherry-picking commit %s."),
1537
- repo_find_unique_abbrev(the_repository, &s->state.cherry_pick_head_oid,
1537
+ repo_find_unique_abbrev(s->repo, &s->state.cherry_pick_head_oid,
1538
DEFAULT_ABBREV));
1539
1540
if (s->hints) {
1564
else
1565
status_printf_ln(s, color,
1566
_("You are currently reverting commit %s."),
1567
- repo_find_unique_abbrev(the_repository, &s->state.revert_head_oid,
1567
+ repo_find_unique_abbrev(s->repo, &s->state.revert_head_oid,
1568
DEFAULT_ABBREV));
1569
if (s->hints) {
1570
if (has_unmerged(s))
1691
char *ref = NULL;
1692
1693
strbuf_init(&cb.buf, 0);
1694
- if (refs_for_each_reflog_ent_reverse(get_main_ref_store(the_repository), "HEAD", grab_1st_switch, &cb) <= 0) {
1694
+ if (refs_for_each_reflog_ent_reverse(get_main_ref_store(r), "HEAD", grab_1st_switch, &cb) <= 0) {
1695
strbuf_release(&cb.buf);
1696
return;
1697
}
2099
upstream_is_gone = 1;
2100
}
2101
2102
- short_base = refs_shorten_unambiguous_ref(get_main_ref_store(the_repository),
2102
+ short_base = refs_shorten_unambiguous_ref(get_main_ref_store(s->repo),
2103
base, 0);
2104
color_fprintf(s->fp, header_color, "...");
2105
color_fprintf(s->fp, branch_color_remote, "%s", short_base);
2233
ab_info = stat_tracking_info(branch, &nr_ahead, &nr_behind,
2234
&base, 0, s->ahead_behind_flags);
2235
if (base) {
2236
- base = refs_shorten_unambiguous_ref(get_main_ref_store(the_repository),
2236
+ base = refs_shorten_unambiguous_ref(get_main_ref_store(s->repo),
2237
base, 0);
2238
fprintf(s->fp, "# branch.upstream %s%c", base, eol);
2239
free((char *)base);