commit - aba5482ebaaee13ae12a318b6be73e480fc5d557
commit + 3ff4cd3cb7275ff6501f11112459f19981554d1e
blob - 7982433cd29d0e8bc48869bb1bb8dfcf5ae59819
blob + 37e87e60ed84e21e9d89ec1ffcd25be3693afafd
--- 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)