1
0
mirror of https://github.com/git/git.git synced 2024-09-28 15:01:31 +02:00

name-rev: avoid unnecessary cast in name_ref()

Casting a 'struct object' to 'struct commit' is unnecessary there,
because it's already available in the local 'commit' variable.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
SZEDER Gábor 2019-11-12 11:38:12 +01:00 committed by Junio C Hamano
parent c3794d4ccb
commit e0c4da6f2a

@ -272,7 +272,7 @@ static int name_ref(const char *path, const struct object_id *oid, int flags, vo
int from_tag = starts_with(path, "refs/tags/");
if (taggerdate == TIME_MAX)
taggerdate = ((struct commit *)o)->date;
taggerdate = commit->date;
path = name_ref_abbrev(path, can_abbreviate_output);
name_rev(commit, xstrdup(path), taggerdate, 0, 0,
from_tag, deref);