Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Drop ref date checks that cannot fire
A ref whose object git cannot parse never joins the list, and a commit's info is allocated even when its buffer cannot be read.
-rw-r--r--source/ui-refs.c4
1 file changed, 1 insertion, 3 deletions
diff --git a/source/ui-refs.c b/source/ui-refs.c
index c8e8f3f..da5e726 100644
--- a/source/ui-refs.c
+++ b/source/ui-refs.c
@@ -32,13 +32,11 @@ struct ref_page {
*/
static timestamp_t ref_date(struct refinfo *ref)
{
- if (!ref->object)
- return 0;
switch (ref->object->type) {
case OBJ_TAG:
return ref->tag ? ref->tag->tagger_date : 0;
case OBJ_COMMIT:
- return ref->commit ? ref->commit->committer_date : 0;
+ return ref->commit->committer_date;
}
return 0;
}