MCPcopy Index your code
hub / github.com/git/git / wt_status_prepare

Function wt_status_prepare

wt-status.c:144–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144void wt_status_prepare(struct repository *r, struct wt_status *s)
145{
146 memset(s, 0, sizeof(*s));
147 s->repo = r;
148 memcpy(s->color_palette, default_wt_status_colors,
149 sizeof(default_wt_status_colors));
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(r),
154 "HEAD", 0, NULL, NULL);
155 s->reference = "HEAD";
156 s->fp = stdout;
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;
161 s->show_branch = -1; /* unspecified */
162 s->show_stash = 0;
163 s->ahead_behind_flags = AHEAD_BEHIND_UNSPECIFIED;
164 s->display_comment_prefix = 0;
165 s->detect_rename = -1;
166 s->rename_score = -1;
167 s->rename_limit = -1;
168}
169
170static void wt_longstatus_print_unmerged_header(struct wt_status *s)
171{

Callers 2

status_init_configFunction · 0.85
fill_commit_messageFunction · 0.85

Calls 3

refs_resolve_refdupFunction · 0.85
get_main_ref_storeFunction · 0.85
repo_get_index_fileFunction · 0.85

Tested by

no test coverage detected