git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] reflog: fix expire --single-worktree

From
Taylor Blau <me@ttaylorr.com>
Date
Oct 30, 2023, 17:21 UTC
Message-ID
<ZT/mN9RouiqzL9aT@nand.local>
In-Reply-To
<xmqqa5s1hxhh.fsf@gitster.g>
On Mon, Oct 30, 2023 at 07:31:22AM +0900, Junio C Hamano wrote:
Show 11 quoted lines
> René Scharfe <l.s.r@web.de> writes:
>
> > ... 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

Previous: René ScharfeNext: Junio C Hamano
Message 6 of 7 in “reflog: fix expire --single-worktree”
  1. reflog: fix expire --single-worktreeRené Scharfe, Oct 28, 2023
  2. Junio C HamanoOct 29, 2023
  3. René ScharfeOct 30, 2023
  4. Junio C HamanoOct 30, 2023
  5. René ScharfeOct 31, 2023
  6. Taylor BlauOct 30, 2023
  7. Junio C HamanoOct 30, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.