| 1312 | } |
| 1313 | |
| 1314 | static char *read_line_from_git_path(struct repository *r, const char *filename) |
| 1315 | { |
| 1316 | struct strbuf buf = STRBUF_INIT; |
| 1317 | FILE *fp = fopen_or_warn(repo_git_path_append(r, &buf, |
| 1318 | "%s", filename), "r"); |
| 1319 | |
| 1320 | if (!fp) { |
| 1321 | strbuf_release(&buf); |
| 1322 | return NULL; |
| 1323 | } |
| 1324 | strbuf_getline_lf(&buf, fp); |
| 1325 | if (!fclose(fp)) { |
| 1326 | return strbuf_detach(&buf, NULL); |
| 1327 | } else { |
| 1328 | strbuf_release(&buf); |
| 1329 | return NULL; |
| 1330 | } |
| 1331 | } |
| 1332 | |
| 1333 | static int split_commit_in_progress(struct wt_status *s) |
| 1334 | { |
no test coverage detected