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

Function help_unknown_ref

help.c:887–906  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

885}
886
887NORETURN void help_unknown_ref(const char *ref, const char *cmd,
888 const char *error)
889{
890 int i;
891 struct string_list suggested_refs = guess_refs(ref);
892
893 fprintf_ln(stderr, _("%s: %s - %s"), cmd, ref, error);
894
895 if (suggested_refs.nr > 0) {
896 fprintf_ln(stderr,
897 Q_("\nDid you mean this?",
898 "\nDid you mean one of these?",
899 suggested_refs.nr));
900 for (i = 0; i < suggested_refs.nr; i++)
901 fprintf(stderr, "\t%s\n", suggested_refs.items[i].string);
902 }
903
904 string_list_clear(&suggested_refs, 0);
905 exit(1);
906}

Callers 2

collect_parentsFunction · 0.85
real_mergeFunction · 0.85

Calls 3

guess_refsFunction · 0.85
fprintf_lnFunction · 0.85
string_list_clearFunction · 0.85

Tested by

no test coverage detected