git-commit-vandalism/Documentation
Ævar Arnfjörð Bjarmason 25754125ce grep: make the behavior for NUL-byte in patterns sane
The behavior of "grep" when patterns contained a NUL-byte has always
been haphazard, and has served the vagaries of the implementation more
than anything else. A pattern containing a NUL-byte can only be
provided via "-f <file>". Since pickaxe (log search) has no such flag
the NUL-byte in patterns has only ever been supported by "grep" (and
not "log --grep").

Since 9eceddeec6 ("Use kwset in grep", 2011-08-21) patterns containing
"\0" were considered fixed. In 966be95549 ("grep: add tests to fix
blind spots with \0 patterns", 2017-05-20) I added tests for this
behavior.

Change the behavior to do the obvious thing, i.e. don't silently
discard a regex pattern and make it implicitly fixed just because they
contain a NUL-byte. Instead die if the backend in question can't
handle them, e.g. --basic-regexp is combined with such a pattern.

This is desired because from a user's point of view it's the obvious
thing to do. Whether we support BRE/ERE/Perl syntax is different from
whether our implementation is limited by C-strings. These patterns are
obscure enough that I think this behavior change is OK, especially
since we never documented the old behavior.

Doing this also makes it easier to replace the kwset backend with
something else, since we'll no longer strictly need it for anything we
can't easily use another fixed-string backend for.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-07-01 14:33:14 -07:00
..
config Merge branch 'dl/format-patch-notes-config' 2019-06-13 13:19:42 -07:00
howto doc: format pathnames and URLs as monospace. 2019-03-13 11:14:22 +09:00
RelNotes The third batch 2019-06-21 11:26:11 -07:00
technical trace2: rename environment variables to GIT_TRACE2* 2019-05-28 10:20:34 -07:00
.gitattributes
.gitignore Merge branch 'js/misc-doc-fixes' 2019-05-09 00:37:27 +09:00
asciidoc.conf
asciidoctor-extensions.rb asciidoctor-extensions: fix spurious space after linkgit 2019-03-11 18:22:07 +09:00
blame-options.txt
build-docdep.perl
cat-texi.perl
cmd-list.perl
CodingGuidelines Merge branch 'es/git-debugger-doc' 2019-06-17 10:15:14 -07:00
config.txt trace2: update docs to describe system/global config settings 2019-04-16 13:37:07 +09:00
date-formats.txt
diff-format.txt log,diff-tree: add --combined-all-paths option 2019-02-07 20:15:25 -08:00
diff-generate-patch.txt log,diff-tree: add --combined-all-paths option 2019-02-07 20:15:25 -08:00
diff-options.txt Merge branch 'nd/diff-parseopt-3' 2019-04-16 19:28:03 +09:00
doc-diff doc-diff: add --cut-header-footer 2019-03-18 15:54:17 +09:00
docbook-xsl.css
docbook.xsl
everyday.txto
fetch-options.txt clone: send server options when using protocol v2 2019-04-18 10:53:51 +09:00
fix-texi.perl
git-add.txt docs: move core.excludesFile from git-add to gitignore 2019-03-08 09:12:45 +09:00
git-am.txt am/cherry-pick/rebase/revert: document --rerere-autoupdate 2019-03-18 10:24:56 +09:00
git-annotate.txt
git-apply.txt
git-archimport.txt git-archimport.1: specify what kind of Arch we're talking about 2018-09-21 09:28:58 -07:00
git-archive.txt
git-bisect-lk2009.txt doc: fix ASCII art tab spacing 2018-10-23 12:23:09 +09:00
git-bisect.txt
git-blame.txt
git-branch.txt Merge branch 'dl/branch-from-3dot-merge-base' 2019-05-19 16:45:28 +09:00
git-bundle.txt
git-cat-file.txt Merge branch 'dt/cat-file-batch-ambiguous' 2019-02-06 22:05:21 -08:00
git-check-attr.txt
git-check-ignore.txt
git-check-mailmap.txt
git-check-ref-format.txt
git-checkout-index.txt
git-checkout.txt Merge branch 'dl/branch-from-3dot-merge-base' 2019-05-19 16:45:28 +09:00
git-cherry-pick.txt cherry-pick/revert: add scissors line on merge conflict 2019-04-19 12:05:36 +09:00
git-cherry.txt
git-citool.txt
git-clean.txt git-clean.txt: clarify ignore pattern files 2019-03-08 09:11:21 +09:00
git-clone.txt clone: add --remote-submodules flag 2019-05-28 09:22:02 -07:00
git-column.txt git-column.txt: fix section header 2018-12-26 15:29:30 -08:00
git-commit-graph.txt Doc: refer to the "commit-graph file" with dash 2018-09-27 15:29:12 -07:00
git-commit-tree.txt commit-tree: utilize parse-options api 2019-03-08 10:31:24 +09:00
git-commit.txt git-commit.txt: better description what it does 2019-02-04 10:00:01 -08:00
git-config.txt Merge branch 'ma/asciidoctor-fixes-more' 2019-04-16 19:28:04 +09:00
git-count-objects.txt
git-credential-cache--daemon.txt
git-credential-cache.txt
git-credential-store.txt
git-credential.txt
git-cvsexportcommit.txt
git-cvsimport.txt
git-cvsserver.txt
git-daemon.txt doc: format pathnames and URLs as monospace. 2019-03-13 11:14:22 +09:00
git-describe.txt describe doc: remove '7-char' abbreviation reference 2019-04-08 17:24:51 +09:00
git-diff-files.txt
git-diff-index.txt
git-diff-tree.txt Documentation/git-diff-tree.txt: fix formatting 2019-04-01 15:17:47 +09:00
git-diff.txt doc: tidy asciidoc style 2019-01-23 11:37:29 -08:00
git-difftool.txt difftool: fallback on merge.guitool 2019-05-13 23:11:59 +09:00
git-fast-export.txt fast-export: do automatic reencoding of commit messages only if requested 2019-05-14 16:48:56 +09:00
git-fast-import.txt fast-import: support 'encoding' commit header 2019-05-14 16:48:56 +09:00
git-fetch-pack.txt
git-fetch.txt doc: tidy asciidoc style 2019-01-23 11:37:29 -08:00
git-filter-branch.txt doc: format pathnames and URLs as monospace. 2019-03-13 11:14:22 +09:00
git-fmt-merge-msg.txt config.txt: move fmt-merge-msg-config.txt to config/ 2018-10-29 10:17:01 +09:00
git-for-each-ref.txt ref-filter: add docs for new options 2018-12-28 10:08:11 -08:00
git-format-patch.txt format-patch: teach format.notes config option 2019-05-17 12:51:53 +09:00
git-fsck-objects.txt
git-fsck.txt Merge branch 'jk/fsck-doc' 2019-03-20 15:16:06 +09:00
git-gc.txt gc docs: remove incorrect reference to gc.auto=0 2019-04-08 17:01:10 +09:00
git-get-tar-commit-id.txt
git-grep.txt grep: make the behavior for NUL-byte in patterns sane 2019-07-01 14:33:14 -07:00
git-gui.txt
git-hash-object.txt hash-object doc: stop mentioning git-cvsimport 2019-05-28 10:47:42 -07:00
git-help.txt doc: format pathnames and URLs as monospace. 2019-03-13 11:14:22 +09:00
git-http-backend.txt Documentation: turn middle-of-line tabs into spaces 2019-03-07 09:25:32 +09:00
git-http-fetch.txt
git-http-push.txt
git-imap-send.txt git-imap-send.txt: move imap.* to a separate file 2018-10-29 10:17:02 +09:00
git-index-pack.txt
git-init-db.txt
git-init.txt Merge branch 'km/init-doc-typofix' 2019-02-06 22:05:21 -08:00
git-instaweb.txt git-instaweb: add Python builtin http.server support 2019-01-28 10:57:44 -08:00
git-interpret-trailers.txt interpret-trailers.txt: start the desc line with a capital letter 2019-04-01 15:49:47 +09:00
git-log.txt Add 'human' date format documentation 2019-01-22 14:16:17 -08:00
git-ls-files.txt doc/ls-files: put nested list for "-t" option into block 2019-04-23 10:25:04 +09:00
git-ls-remote.txt Documentation: turn middle-of-line tabs into spaces 2019-03-07 09:25:32 +09:00
git-ls-tree.txt doc: format pathnames and URLs as monospace. 2019-03-13 11:14:22 +09:00
git-mailinfo.txt
git-mailsplit.txt
git-merge-base.txt doc: fix ASCII art tab spacing 2018-10-23 12:23:09 +09:00
git-merge-file.txt
git-merge-index.txt
git-merge-one-file.txt
git-merge-tree.txt
git-merge.txt Merge branch 'nd/merge-quit' 2019-06-13 13:19:41 -07:00
git-mergetool--lib.txt mergetool: use get_merge_tool function 2019-05-13 23:11:59 +09:00
git-mergetool.txt mergetool: fallback to tool when guitool unavailable 2019-05-13 23:11:59 +09:00
git-mktag.txt
git-mktree.txt
git-multi-pack-index.txt multi-pack-index: add 'verify' verb 2018-09-17 13:49:38 -07:00
git-mv.txt
git-name-rev.txt
git-notes.txt Documentation: turn middle-of-line tabs into spaces 2019-03-07 09:25:32 +09:00
git-p4.txt doc: tidy asciidoc style 2019-01-23 11:37:29 -08:00
git-pack-objects.txt list-objects: consume sparse tree walk 2019-01-17 13:44:39 -08:00
git-pack-redundant.txt
git-pack-refs.txt
git-parse-remote.txt
git-patch-id.txt
git-prune-packed.txt
git-prune.txt
git-pull.txt docs: say that --rebase=preserve is deprecated 2019-05-28 13:22:34 -07:00
git-push.txt push doc: document the DWYM behavior pushing to unqualified <dst> 2018-11-14 15:27:56 +09:00
git-quiltimport.txt git-quiltimport: add --keep-non-patch option 2019-01-07 15:29:34 -08:00
git-range-diff.txt range-diff doc: add a section about output stability 2018-11-12 12:05:38 +09:00
git-read-tree.txt Merge branch 'nd/checkout-m' 2019-04-25 16:41:14 +09:00
git-rebase.txt Merge branch 'js/rebase-deprecate-preserve-merges' 2019-05-30 10:50:45 -07:00
git-receive-pack.txt
git-reflog.txt reflog expire: cover reflog from all worktrees 2018-10-22 13:32:54 +09:00
git-remote-ext.txt Merge branch 'js/check-docs-exe' 2019-04-22 11:14:46 +09:00
git-remote-fd.txt docs: move gitremote-helpers into section 7 2019-04-01 14:00:53 +09:00
git-remote-helpers.txto docs: move gitremote-helpers into section 7 2019-04-01 14:00:53 +09:00
git-remote.txt
git-repack.txt Merge branch 'cc/delta-islands' 2018-09-17 13:53:55 -07:00
git-replace.txt
git-request-pull.txt
git-rerere.txt rerere doc: quote rerere.enabled 2019-04-08 17:23:25 +09:00
git-reset.txt Merge branch 'dl/reset-doc-no-wrt-abbrev' 2019-04-10 02:14:21 +09:00
git-rev-list.txt
git-rev-parse.txt
git-revert.txt cherry-pick/revert: add scissors line on merge conflict 2019-04-19 12:05:36 +09:00
git-rm.txt
git-send-email.txt Merge branch 'cm/send-email-document-req-modules' 2019-06-21 11:24:10 -07:00
git-send-pack.txt
git-sh-i18n--envsubst.txt
git-sh-i18n.txt
git-sh-setup.txt
git-shell.txt
git-shortlog.txt
git-show-branch.txt Documentation/git-show-branch: avoid literal {apostrophe} 2019-04-10 12:05:03 +09:00
git-show-index.txt
git-show-ref.txt git-show-ref.txt: fix order of flags 2019-01-10 10:29:05 -08:00
git-show.txt
git-stage.txt
git-stash.txt stash: mention options in show synopsis 2019-03-07 09:41:40 +09:00
git-status.txt Documentation/git-status: fix titles in porcelain v2 section 2019-04-01 17:46:26 +09:00
git-stripspace.txt
git-submodule.txt Merge branch 'dl/submodule-set-branch' 2019-04-25 16:41:18 +09:00
git-svn.txt Merge branch 'tz/git-svn-doc-markup-fix' 2019-05-09 00:37:23 +09:00
git-symbolic-ref.txt
git-tag.txt doc: tidy asciidoc style 2019-01-23 11:37:29 -08:00
git-tools.txt
git-unpack-file.txt
git-unpack-objects.txt
git-update-index.txt Merge branch 'jc/update-index-doc' 2018-08-20 11:33:50 -07:00
git-update-ref.txt Merge branch 'ah/doc-updates' into maint 2018-11-21 22:58:07 +09:00
git-update-server-info.txt update-server-info: avoid needless overwrites 2019-05-15 14:07:37 +09:00
git-upload-archive.txt
git-upload-pack.txt doc: tidy asciidoc style 2019-01-23 11:37:29 -08:00
git-var.txt
git-verify-commit.txt
git-verify-pack.txt
git-verify-tag.txt
git-web--browse.txt doc: format pathnames and URLs as monospace. 2019-03-13 11:14:22 +09:00
git-whatchanged.txt
git-worktree.txt doc: fix typos in man pages 2019-03-18 14:45:21 +09:00
git-write-tree.txt
git.txt Merge branch 'po/git-help-on-git-itself' 2019-06-17 10:15:19 -07:00
gitattributes.txt Merge branch 'ml/userdiff-rust' 2019-06-21 11:24:08 -07:00
gitcli.txt
gitcore-tutorial.txt
gitcredentials.txt doc: clarify gitcredentials path component matching 2018-09-27 15:24:50 -07:00
gitcvs-migration.txt
gitdiffcore.txt log -G: ignore binary files 2018-12-26 14:59:37 -08:00
giteveryday.txt
gitglossary.txt
githooks.txt Merge branch 'bp/post-index-change-hook' 2019-04-25 16:41:11 +09:00
gitignore.txt Merge branch 'an/ignore-doc-update' 2019-06-21 11:24:11 -07:00
gitk.txt doc: format pathnames and URLs as monospace. 2019-03-13 11:14:22 +09:00
gitmodules.txt doc: format pathnames and URLs as monospace. 2019-03-13 11:14:22 +09:00
gitnamespaces.txt
gitremote-helpers.txt Merge branch 'js/check-docs-exe' 2019-04-22 11:14:46 +09:00
gitrepository-layout.txt doc: format pathnames and URLs as monospace. 2019-03-13 11:14:22 +09:00
gitrevisions.txt push doc: correct lies about how push refspecs work 2018-08-31 14:04:06 -07:00
gitsubmodules.txt gitsubmodules: align html and nroff lists 2019-05-28 09:42:06 -07:00
gittutorial-2.txt
gittutorial.txt
gitweb.conf.txt Merge branch 'cb/doco-mono' 2019-04-22 11:14:45 +09:00
gitweb.txt doc: format pathnames and URLs as monospace. 2019-03-13 11:14:22 +09:00
gitworkflows.txt
glossary-content.txt Merge branch 'tg/glossary-overlay' 2019-04-16 19:28:07 +09:00
howto-index.sh
i18n.txt
install-doc-quick.sh
install-webdoc.sh
line-range-format.txt
lint-gitlink.perl
mailmap.txt
Makefile Merge branch 'es/first-contrib-tutorial' 2019-06-17 10:15:19 -07:00
manpage-1.72.xsl
manpage-base-url.xsl.in
manpage-base.xsl
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-quote-apos.xsl
manpage-suppress-sp.xsl
merge-options.txt Merge branch 'vv/merge-squash-with-explicit-commit' 2019-06-17 10:15:17 -07:00
merge-strategies.txt
MyFirstContribution.txt doc: add some nit fixes to MyFirstContribution 2019-05-29 14:07:35 -07:00
pretty-formats.txt Merge branch 'aw/pretty-trailers' 2019-03-07 09:59:52 +09:00
pretty-options.txt
pull-fetch-param.txt fetch doc: correct grammar in --force docs 2018-09-20 09:40:03 -07:00
rev-list-options.txt list-objects-filter: disable 'sparse:path' filters 2019-05-29 11:05:34 -07:00
revisions.txt Merge branch 'dl/rev-tilde-doc-clarify' 2019-05-13 23:50:34 +09:00
sequencer.txt doc: format pathnames and URLs as monospace. 2019-03-13 11:14:22 +09:00
SubmittingPatches doc: format pathnames and URLs as monospace. 2019-03-13 11:14:22 +09:00
texi.xsl
trace2-target-values.txt trace2: update docs to describe system/global config settings 2019-04-16 13:37:07 +09:00
transfer-data-leaks.txt
urls-remotes.txt
urls.txt docs: move gitremote-helpers into section 7 2019-04-01 14:00:53 +09:00
user-manual.conf
user-manual.txt