Support for pickaxe matching regular expressions
git-diff-* --pickaxe-regex will change the -S pickaxe to match POSIX extended regular expressions instead of fixed strings. The regex.h library is a rather stupid interface and I like pcre too, but with any luck it will be everywhere we will want to run Git on, it being POSIX.2 and all. I'm not sure if we can expect platforms like AIX to conform to POSIX.2 or if win32 has regex.h. We might add a flag to Makefile if there is a portability trouble potential. Signed-off-by: Petr Baudis <pasky@suse.cz>
This commit is contained in:

committed by
Junio C Hamano

parent
810e152375
commit
d01d8c6782
2
diff.c
2
diff.c
@ -883,6 +883,8 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
|
||||
options->filter = arg + 14;
|
||||
else if (!strcmp(arg, "--pickaxe-all"))
|
||||
options->pickaxe_opts = DIFF_PICKAXE_ALL;
|
||||
else if (!strcmp(arg, "--pickaxe-regex"))
|
||||
options->pickaxe_opts = DIFF_PICKAXE_REGEX;
|
||||
else if (!strncmp(arg, "-B", 2)) {
|
||||
if ((options->break_opt =
|
||||
diff_scoreopt_parse(arg)) == -1)
|
||||
|
Reference in New Issue
Block a user