Commit 528c17ddfb50dc3e1efdba2fcfec0bff8a1f2c01

Stefan Sperling 2020-07-31T13:01:24

use a more precise regex for color-highlighting 'commit' lines in 'tog log'

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tog/tog.c b/tog/tog.c
index 47ddd48..be1e9bf 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -3341,7 +3341,7 @@ open_diff_view(struct tog_view *view, struct got_object_id *id1,
 		}
 
 		err = add_color(&s->colors,
-		    "^(commit|(blob|file) [-+] |[MDmA]  [^ ])",
+		    "^(commit [0-9a-f]|(blob|file) [-+] |[MDmA]  [^ ])",
 		    TOG_COLOR_DIFF_META,
 		    get_color_value("TOG_COLOR_DIFF_META"));
 		if (err) {