Re: [PATCH v2 09/22] pickaxe: die when -G and --pickaxe-regex are combined
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 30, 2021, 23:36 UTC
- Message-ID
- <xmqqwnto9pt7.fsf@gitster.g>
- In-Reply-To
- <20210216115801.4773-10-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 9 quoted lines
> When the -G and --pickaxe-regex options are combined we simply ignore > the --pickaxe-regex option. Let's die instead as suggested by our > documentation, since -G is always a regex. > > When --pickaxe-regex was added in d01d8c6782 (Support for pickaxe > matching regular expressions, 2006-03-29) only the -S option > existed. Then when -G was added in f506b8e8b5 (git log/diff: add > -G<regexp> that greps in the patch text, 2010-08-23) neither the > documentation for --pickaxe-regex was updater accordingly, nor was
s/updater/updated/;
Show 5 quoted lines
> something like this assertion added. > > Since 5bc3f0b567 (diffcore-pickaxe doc: document -S and -G properly, > 2013-05-31) we've claimed that --pickaxe-regex should only be used > with -S, but have silently toileted combining it with -G, let's die
toilet? tolerate?
> instead.
Hmph. I've always hated that -G can only take regexp and users cannot ask for a fixed-string match. It may not be a bad idea to keep this as-is, as that would leave the door open for those who are motivated enough to later introduce --no-pickaxe-regex, so that -G<string> would naturally work with combination with it.