From: Taylor Blau <me@ttaylorr.com>
To: "Martin Ågren" <martin.agren@gmail.com>
Cc: git@vger.kernel.org, Adam Dinwoodie <adam@dinwoodie.org>
Subject: Re: [PATCH] diff-options.txt: avoid "regex" overload in example
Date: Sat, 8 Feb 2020 15:24:05 -0800 [thread overview]
Message-ID: <20200208232405.GC33529@syl.local> (raw)
In-Reply-To: <20200206205301.27367-1-martin.agren@gmail.com>
Hi Martin,
On Thu, Feb 06, 2020 at 09:53:01PM +0100, Martin Ågren wrote:
> When we exemplify the difference between `-G` and `-S` (using
> `--pickaxe-regex`), we do so using an example diff and git-diff
> invocation involving "regexec", "regexp", "regmatch", ...
>
> The example is correct, but we can make it easier to untangle by
> avoiding writing "regex.*" unless it's really needed to make our point.
>
> Use some made-up, non-regexy words instead.
This is a good idea, and I think that it removes additional, unnecessary
confusion from the documentation here.
> Reported-by: Adam Dinwoodie <adam@dinwoodie.org>
> Signed-off-by: Martin Ågren <martin.agren@gmail.com>
> ---
> Documentation/diff-options.txt | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
> index 09faee3b44..bb31f0c42b 100644
> --- a/Documentation/diff-options.txt
> +++ b/Documentation/diff-options.txt
> @@ -567,13 +567,13 @@ To illustrate the difference between `-S<regex> --pickaxe-regex` and
> file:
> +
> ----
> -+ return !regexec(regexp, two->ptr, 1, ®match, 0);
> ++ return frotz(nitfol, two->ptr, 1, 0);
> ...
> -- hit = !regexec(regexp, mf2.ptr, 1, ®match, 0);
> +- hit = frotz(nitfol, mf2.ptr, 1, 0);
> ----
> +
> -While `git log -G"regexec\(regexp"` will show this commit, `git log
> --S"regexec\(regexp" --pickaxe-regex` will not (because the number of
> +While `git log -G"frotz\(nitfol"` will show this commit, `git log
> +-S"frotz\(nitfol" --pickaxe-regex` will not (because the number of
> occurrences of that string did not change).
> +
> Unless `--text` is supplied patches of binary files without a textconv
> --
> 2.25.0
Thanks for doing it.
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Thanks,
Taylor
next prev parent reply other threads:[~2020-02-08 23:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-02 19:22 [PATCH] diff-options.txt: correct command syntax Adam Dinwoodie
2020-02-02 19:45 ` Martin Ågren
2020-02-02 20:47 ` Adam Dinwoodie
2020-02-03 6:24 ` Martin Ågren
2020-02-06 20:53 ` [PATCH] diff-options.txt: avoid "regex" overload in example Martin Ågren
2020-02-08 23:24 ` Taylor Blau [this message]
2020-02-09 17:25 ` Junio C Hamano
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: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200208232405.GC33529@syl.local \
--to=me@ttaylorr.com \
--cc=adam@dinwoodie.org \
--cc=git@vger.kernel.org \
--cc=martin.agren@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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).