From 436480953b46f98c0bb0a2e0b0334267d1068e96 Mon Sep 17 00:00:00 2001 From: Thomas Koutcher Date: Wed, 4 Dec 2024 19:41:03 +0100 Subject: [PATCH] Fix parsing of reflog designator in timestamp format --- NEWS.adoc | 1 + src/main.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS.adoc b/NEWS.adoc index 1e37f6d0f..8c1761a5d 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -15,6 +15,7 @@ Bug fixes: - Fix message upon edit from diffstat without patch. - Fix missing dates in the refs view. - Don't report an error when diff-highlight is killed intentionally. + - Fix parsing of reflog designator in timestamp format. Improvements: diff --git a/src/main.c b/src/main.c index 86b01314a..edfbf6103 100644 --- a/src/main.c +++ b/src/main.c @@ -387,12 +387,12 @@ main_get_column_data(struct view *view, const struct line *line, struct view_col static bool main_add_reflog(struct view *view, struct main_state *state, char *reflog) { - char *end = strchr(reflog, ' '); + char *end = strchr(reflog, '}'); int id_width; if (!end) return false; - *end = 0; + *++end = 0; if (!realloc_reflogs(&state->reflog, state->reflogs, 1) || !(reflog = strdup(reflog)))