Skip to content

Commit b424ddc

Browse files
committed
Merge branch 'avar/pcre2-conversion-of-diffcore-pickaxe-plus-avar/grep-post-drop-prefix-cleanup' into build-master
* avar/pcre2-conversion-of-diffcore-pickaxe-plus-avar/grep-post-drop-prefix-cleanup: HOTFIX for being on top of avar/grep-post-drop-prefix-cleanup fixup earlier, ./t7810-grep.sh (and maybe ./t4014-format-patch.sh?) fails without this better? free stuff, is the objfind a bug? Revert "wip reg_newline etc. test" only compile pattern once: TODO, free it wip reg_newline etc. test diffcore-pickaxe: add --pickaxe-patch for use with -G Remove unused kwset.[ch] pickaxe: use PCREv2 for -G and -S grep.h: make patmatch() a public function
2 parents 2a8f7b6 + 55dcbf1 commit b424ddc

17 files changed

+188
-1907
lines changed

Documentation/diff-options.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,9 @@ occurrences of that string did not change).
671671
Unless `--text` is supplied patches of binary files without a textconv
672672
filter will be ignored.
673673
+
674+
When `--pickaxe-patch` is supplied the whole diff is searched instead
675+
of just added/removed lines. See below.
676+
+
674677
See the 'pickaxe' entry in linkgit:gitdiffcore[7] for more
675678
information.
676679

@@ -692,6 +695,20 @@ The object can be a blob or a submodule commit. It implies the `-t` option in
692695
Treat the <string> given to `-S` as an extended POSIX regular
693696
expression to match.
694697

698+
--pickaxe-patch::
699+
When `-G` looks for a change a diff will be generated, and
700+
only the added/removed lines will be matched against with the
701+
"+" or "-" stripped.
702+
+
703+
Supplying this option skips that pre-processing. This makes it
704+
possible to match only lines that added or removed something matching
705+
a <regex> with "\^\+<regex>" and "^-<regex>", respectively.
706+
+
707+
It also allows for finding something in the diff context. E.g. "\^
708+
<regex>" will match the context lines (see `-U<n>` above) around the
709+
added/removed lines, and doing an unanchored match will match any of
710+
the the added/removed lines & diff context.
711+
695712
endif::git-format-patch[]
696713

697714
-O<orderfile>::

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,6 @@ LIB_OBJS += commit-graph.o
10361036
LIB_OBJS += commit-reach.o
10371037
LIB_OBJS += commit.o
10381038
LIB_OBJS += compat/nonblock.o
1039-
LIB_OBJS += compat/obstack.o
10401039
LIB_OBJS += compat/terminal.o
10411040
LIB_OBJS += compat/zlib-uncompress2.o
10421041
LIB_OBJS += config.o
@@ -1090,7 +1089,6 @@ LIB_OBJS += hex.o
10901089
LIB_OBJS += hook.o
10911090
LIB_OBJS += ident.o
10921091
LIB_OBJS += json-writer.o
1093-
LIB_OBJS += kwset.o
10941092
LIB_OBJS += levenshtein.o
10951093
LIB_OBJS += line-log.o
10961094
LIB_OBJS += line-range.o
@@ -1379,7 +1377,6 @@ BUILTIN_OBJS += builtin/write-tree.o
13791377
THIRD_PARTY_SOURCES += compat/inet_ntop.c
13801378
THIRD_PARTY_SOURCES += compat/inet_pton.c
13811379
THIRD_PARTY_SOURCES += compat/nedmalloc/%
1382-
THIRD_PARTY_SOURCES += compat/obstack.%
13831380
THIRD_PARTY_SOURCES += compat/poll/%
13841381
THIRD_PARTY_SOURCES += compat/regex/%
13851382
THIRD_PARTY_SOURCES += sha1collisiondetection/%

0 commit comments

Comments
 (0)