MCPcopy Create free account
hub / github.com/git/git / wt_shortstatus_unmerged

Function wt_shortstatus_unmerged

wt-status.c:2016–2041  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2014}
2015
2016static void wt_shortstatus_unmerged(struct string_list_item *it,
2017 struct wt_status *s)
2018{
2019 struct wt_status_change_data *d = it->util;
2020 const char *how = "??";
2021
2022 switch (d->stagemask) {
2023 case 1: how = "DD"; break; /* both deleted */
2024 case 2: how = "AU"; break; /* added by us */
2025 case 3: how = "UD"; break; /* deleted by them */
2026 case 4: how = "UA"; break; /* added by them */
2027 case 5: how = "DU"; break; /* deleted by us */
2028 case 6: how = "AA"; break; /* both added */
2029 case 7: how = "UU"; break; /* both modified */
2030 }
2031 color_fprintf(s->fp, color(WT_STATUS_UNMERGED, s), "%s", how);
2032 if (s->null_termination) {
2033 fprintf(s->fp, " %s%c", it->string, 0);
2034 } else {
2035 struct strbuf onebuf = STRBUF_INIT;
2036 const char *one;
2037 one = quote_path(it->string, s->prefix, &onebuf, QUOTE_PATH_QUOTE_SP);
2038 fprintf(s->fp, " %s\n", one);
2039 strbuf_release(&onebuf);
2040 }
2041}
2042
2043static void wt_shortstatus_status(struct string_list_item *it,
2044 struct wt_status *s)

Callers 1

wt_shortstatus_printFunction · 0.85

Calls 4

color_fprintfFunction · 0.85
quote_pathFunction · 0.85
strbuf_releaseFunction · 0.85
colorFunction · 0.70

Tested by

no test coverage detected