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

Function read_input_file

builtin/interpret-trailers.c:96–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96static void read_input_file(struct strbuf *sb, const char *file)
97{
98 if (file) {
99 if (strbuf_read_file(sb, file, 0) < 0)
100 die_errno(_("could not read input file '%s'"), file);
101 } else {
102 if (strbuf_read(sb, fileno(stdin), 0) < 0)
103 die_errno(_("could not read from stdin"));
104 }
105 strbuf_complete_line(sb);
106}
107
108static void interpret_trailers(const struct process_trailer_options *opts,
109 struct list_head *new_trailer_head,

Callers 1

interpret_trailersFunction · 0.85

Calls 4

strbuf_read_fileFunction · 0.85
die_errnoFunction · 0.85
strbuf_readFunction · 0.85
strbuf_complete_lineFunction · 0.85

Tested by

no test coverage detected