Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2019-11-12 13:38:12 +0300
committerJunio C Hamano <gitster@pobox.com>2019-12-07 00:29:04 +0300
commite0c4da6f2adcede27fb097337c71f7b377a074a1 (patch)
tree39fb68b96e32645fff6e1577ae2ac415de5cad4d /builtin/name-rev.c
parentc3794d4ccb70c6b36be3fd4981682f422b04de05 (diff)
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>
Diffstat (limited to 'builtin/name-rev.c')
-rw-r--r--builtin/name-rev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index 15919adbdbe..e40f51c2b4a 100644
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
@@ -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);