commit - 5e43aca66f1762b7612d9efb4b000575f1b7a3ab
commit + 00ddec2f20c1ce1b0136a7ae54efb790069126ec
blob - ff292e9cadc7e6213f828308478d7827b79cb69a
blob + 7dce0c320b49b2d997e618585f826a965d125d27
--- 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)