diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-05-09 18:48:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-09 22:53:16 -0700 |
commit | cca2c172e0c37eff8e743b63016b6bc604b38a7d (patch) | |
tree | cd8b503515da895d7f620b85ad59e8a59ecf4c73 /git-sh-setup.sh | |
parent | git-grep: Bail out when -P is used with -F or -E (diff) | |
download | tgif-cca2c172e0c37eff8e743b63016b6bc604b38a7d.tar.xz |
git-grep: do not die upon -F/-P when grep.extendedRegexp is set.
The previous one made "git grep -P" fail when grep.extendedRegexp is
enabled. That is a no-starter. The option on the command line should
just make the command ignore the configured default. The handling of "-F"
in the existing code has the same problem.
Instead of saying -G/-F/-E/-P incompatible with each other, just allow
the last one win. That way, you can have "[alias] gr = grep -P" and
use Pcre for everyday work e.g. "git gr ':i?foo'", and append -G to the
aliased command line to override it e.g. "git gr -G '[Ff][Oo][Oo]'".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-sh-setup.sh')
0 files changed, 0 insertions, 0 deletions