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

Function get_ref

builtin/notes.c:1108–1125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1106}
1107
1108static int get_ref(int argc, const char **argv, const char *prefix,
1109 struct repository *repo UNUSED)
1110{
1111 struct option options[] = { OPT_END() };
1112 char *notes_ref;
1113 argc = parse_options(argc, argv, prefix, options,
1114 git_notes_get_ref_usage, 0);
1115
1116 if (argc) {
1117 error(_("too many arguments"));
1118 usage_with_options(git_notes_get_ref_usage, options);
1119 }
1120
1121 notes_ref = default_notes_ref(the_repository);
1122 puts(notes_ref);
1123 free(notes_ref);
1124 return 0;
1125}
1126
1127int cmd_notes(int argc,
1128 const char **argv,

Callers

nothing calls this directly

Calls 4

parse_optionsFunction · 0.85
errorFunction · 0.85
usage_with_optionsFunction · 0.85
default_notes_refFunction · 0.85

Tested by

no test coverage detected