From: Eric Wong <e@80x24.org>
To: Kyle Meyer <kyle@kyleam.com>
Cc: meta@public-inbox.org
Subject: Re: [PATCH] lei rediff: fix construction of git-diff options
Date: Fri, 21 May 2021 09:52:14 +0000 [thread overview]
Message-ID: <YKeCzlAax1wenDYW@dcvr> (raw)
In-Reply-To: <20210521043816.23838-1-kyle@kyleam.com>
Kyle Meyer <kyle@kyleam.com> wrote:
> When generating git-diff options, lei-rediff extracts the single
> character option from the lei option spec. However, there's no check
> that the regular expression actually matches, leading to an
> unintentional git-diff option when there isn't a short option (e.g.,
> --inter-hunk-context=1 maps to the invalid `git diff --color -w1').
>
> Check for a match before trying to extract the single character
> option.
>
> Fixes: cf0c7ce3ce81b5c3 (lei rediff: regenerate diffs from stdin)
Oops :x Spending years in another language corrupted my
mind to believe $1 gets clobbered on failed matches;
but that's not the case for Perl.
An unrelated patch I'm working on had the same problem :x
Anyways, pushed as commit 3c1d0da4d0608b5a87371e602a911964d7c1498c
Thanks.
prev parent reply other threads:[~2021-05-21 9:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-21 4:38 [PATCH] lei rediff: fix construction of git-diff options Kyle Meyer
2021-05-21 9:52 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YKeCzlAax1wenDYW@dcvr \
--to=e@80x24.org \
--cc=kyle@kyleam.com \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).