commit - 61dd0f65df684a93379cfa4c195ba43ee493bfc7
commit + 85c34e74e98435d0ebb99360b18587411a652741
blob - b5cc0d766589d88610458ba52595511cd0f39987
blob + 4820a2165e94f15daabdf5007b667947b46f6049
--- got/got.c
+++ got/got.c
if (refs) {
err = build_refs_str(&ref_str, refs, id, repo, 1);
if (err)
- goto done;
+ return err;
/* Display the first matching ref only. */
if (ref_str && (comma = strchr(ref_str, ',')) != NULL)
}
committer_time = got_object_commit_get_committer_time(commit);
- if (gmtime_r(&committer_time, &tm) == NULL)
- return got_error_from_errno("gmtime_r");
- if (strftime(datebuf, sizeof(datebuf), "%G-%m-%d ", &tm) == 0)
- return got_error(GOT_ERR_NO_SPACE);
+ if (gmtime_r(&committer_time, &tm) == NULL) {
+ err = got_error_from_errno("gmtime_r");
+ goto done;
+ }
+ if (strftime(datebuf, sizeof(datebuf), "%G-%m-%d ", &tm) == 0) {
+ err = got_error(GOT_ERR_NO_SPACE);
+ goto done;
+ }
err = got_object_commit_get_logmsg(&logmsg0, commit);
if (err)