Re: [PATCH] reflog: fix expire --single-worktree
From: Taylor Blau <hidden>
Date: 2023-10-30 17:22:03
On Mon, Oct 30, 2023 at 07:31:22AM +0900, Junio C Hamano wrote:
René Scharfe [off-list ref] writes:quoted
... and added a non-printable short flag for it, presumably by accident.Very well spotted. FWIW, with the following patch on top of this patch, all tests pass (and without your fix, of course this notices the "\001" and breaks numerous tests that use "git reflog"). So you seem to have found the only one broken instance (among those that are tested, anyway).
This makes sense to me, but obviously won't catch non-tested cases. I
thought that a new Cocinelle rule might be appropriate here, but it is
frustratingly difficult to specify a constraint like:
OPT_BOOL(e1, e2, e3, ...)
with
!(e1 == 0 || (33 <= e1 && e1 <= 127))
I'll think on it a little bit, but this seems low priority enough that I
don't feel compelled to urgently deal with adding a new Coccinelle rule.
Thanks,
Taylor