commit - 29efeeddc18828c36f1a6df50e05297a51a1a396
commit + 9cd447eb681a736f222bbe134ca37c1fb30cfa89
blob - 6d3e738e1220743df1fd30ba6a2779ff5b504e3e
blob + b36e61c3235f83e985356cd25d8fb8657cc2f6c8
--- tog/tog.c
+++ tog/tog.c
const char *name;
*refs_str = NULL;
+
+ if (refs == NULL)
+ return NULL;
TAILQ_FOREACH(re, refs, entry) {
struct got_tag_object *tag = NULL;
/* Prepend reference labels to log message if possible .*/
refs = got_reflist_object_id_map_lookup(tog_refs_idmap, id);
- if (refs)
- err = build_refs_str(&refs_str, refs, id, s->repo);
+ err = build_refs_str(&refs_str, refs, id, s->repo);
if (err)
goto done;
if (refs_str) {
return err;
refs = got_reflist_object_id_map_lookup(tog_refs_idmap,
s->selected_entry->id);
- if (refs) {
- err = build_refs_str(&refs_str, refs,
- s->selected_entry->id, s->repo);
- if (err)
- goto done;
- }
+ err = build_refs_str(&refs_str, refs, s->selected_entry->id,
+ s->repo);
+ if (err)
+ goto done;
}
if (s->thread_args.commits_needed == 0 && !using_mock_io)
off_t outoff = 0;
int n;
- if (refs) {
- err = build_refs_str(&refs_str, refs, commit_id, repo);
- if (err)
- return err;
- }
+ err = build_refs_str(&refs_str, refs, commit_id, repo);
+ if (err)
+ return err;
err = got_object_open_as_commit(&commit, repo, commit_id);
if (err)