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

Function wt_longstatus_print_cached_header

wt-status.c:227–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227static void wt_longstatus_print_cached_header(struct wt_status *s)
228{
229 const char *c = color(WT_STATUS_HEADER, s);
230
231 status_printf_ln(s, c, _("Changes to be committed:"));
232 if (!s->hints)
233 return;
234 if (s->whence != FROM_COMMIT)
235 ; /* NEEDSWORK: use "git reset --unresolve"??? */
236 else if (!s->is_initial) {
237 if (!strcmp(s->reference, "HEAD"))
238 status_printf_ln(s, c
239 , _(" (use \"git restore --staged <file>...\" to unstage)"));
240 else
241 status_printf_ln(s, c,
242 _(" (use \"git restore --source=%s --staged <file>...\" to unstage)"),
243 s->reference);
244 } else
245 status_printf_ln(s, c, _(" (use \"git rm --cached <file>...\" to unstage)"));
246}
247
248static void wt_longstatus_print_dirty_header(struct wt_status *s,
249 int has_deleted,

Callers 1

Calls 2

status_printf_lnFunction · 0.85
colorFunction · 0.70

Tested by

no test coverage detected