From 978b5e444215255a9671ce439f1594888697f799 Mon Sep 17 00:00:00 2001 From: Bence Ferdinandy Date: Fri, 19 Jan 2024 14:57:17 +0100 Subject: git-stats-graph: fix release dates The dates associated with tags and HEAD was always the previous tag. Fix the indexing for date parsing. Signed-off-by: Bence Ferdinandy Acked-by: Robin Jarry --- contrib/git-stats-graph.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/git-stats-graph.py b/contrib/git-stats-graph.py index 7632d566..dc944c18 100755 --- a/contrib/git-stats-graph.py +++ b/contrib/git-stats-graph.py @@ -44,7 +44,9 @@ def stats(): for i, t in enumerate(tags[:-1]): counts.append(int(git("rev-list", f"{t}..{tags[i+1]}", "--count"))) dates.append( - date.fromisoformat(git("show", "-s", "--format=%cs", t).split("\n")[-1]) + date.fromisoformat( + git("show", "-s", "--format=%cs", tags[i + 1]).split("\n")[-1] + ) ) statline = git("diff", "--stat", t, tags[i + 1]).split("\n")[-1] fnum, _, _, ins, _, dels, _ = statline.split() -- cgit