1
0
mirror of https://github.com/git/git.git synced 2024-10-19 11:48:53 +02:00
git/Documentation
Jeff King 823ab40fd4 add global --literal-pathspecs option
Git takes pathspec arguments in many places to limit the
scope of an operation. These pathspecs are treated not as
literal paths, but as glob patterns that can be fed to
fnmatch. When a user is giving a specific pattern, this is a
nice feature.

However, when programatically providing pathspecs, it can be
a nuisance. For example, to find the latest revision which
modified "$foo", one can use "git rev-list -- $foo". But if
"$foo" contains glob characters (e.g., "f*"), it will
erroneously match more entries than desired. The caller
needs to quote the characters in $foo, and even then, the
results may not be exactly the same as with a literal
pathspec. For instance, the depth checks in
match_pathspec_depth do not kick in if we match via fnmatch.

This patch introduces a global command-line option (i.e.,
one for "git" itself, not for specific commands) to turn
this behavior off. It also has a matching environment
variable, which can make it easier if you are a script or
porcelain interface that is going to issue many such
commands.

This option cannot turn off globbing for particular
pathspecs. That could eventually be done with a ":(noglob)"
magic pathspec prefix. However, that level of granularity is
more cumbersome to use for many cases, and doing ":(noglob)"
right would mean converting the whole codebase to use
"struct pathspec", as the usual "const char **pathspec"
cannot represent extra per-item flags.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 14:58:59 -08:00
..
howto Documentation/howto: convert plain text files to asciidoc 2012-10-18 10:51:34 -07:00
pt_BR
RelNotes Git 1.8.1-rc2 2012-12-15 11:19:02 -08:00
technical Renumber list in api-command.txt 2012-12-15 10:46:47 -08:00
.gitattributes
.gitignore
asciidoc.conf Merge branch 'jk/docs-docbook-monospace-display' into maint-1.7.11 2012-09-11 11:08:40 -07:00
blame-options.txt
build-docdep.perl
cat-texi.perl
cmd-list.perl
CodingGuidelines Documentation/CodingGuidelines: spell out more shell guidelines 2012-08-15 11:00:39 -07:00
config.txt Merge branch 'mm/status-push-pull-advise' 2012-12-04 13:34:10 -08:00
date-formats.txt
diff-config.txt Documentation/diff-config: work around AsciiDoc misfortune 2012-12-07 15:15:59 -08:00
diff-format.txt
diff-generate-patch.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
diff-options.txt Sync with 'maint' 2012-12-18 10:51:22 -08:00
docbook-xsl.css
docbook.xsl
everyday.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
fetch-options.txt Doc: shallow clone deepens _to_ new depth 2012-09-18 21:47:12 -07:00
fix-texi.perl
git-add.txt Doc add: link gitignore 2012-09-18 21:49:46 -07:00
git-am.txt
git-annotate.txt
git-apply.txt apply: document --3way option 2012-07-09 14:40:03 -07:00
git-archimport.txt
git-archive.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-bisect-lk2009.txt Shorten two over-long lines in git-bisect-lk2009.txt by abbreviating some sha1 2012-10-16 16:09:09 -07:00
git-bisect.txt
git-blame.txt git blame: document that it always follows origin across whole-file renames 2012-09-21 12:14:19 -07:00
git-branch.txt Merge branch 'po/maint-docs' 2012-09-25 10:39:52 -07:00
git-bundle.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-cat-file.txt
git-check-attr.txt
git-check-ref-format.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-checkout-index.txt
git-checkout.txt Merge branch 'jc/maint-checkout-fileglob-doc' into maint-1.7.11 2012-09-14 20:45:03 -07:00
git-cherry-pick.txt Merge branch 'cw/cherry-pick-allow-empty-message' 2012-09-03 15:53:37 -07:00
git-cherry.txt
git-citool.txt
git-clean.txt Doc clean: add See Also link 2012-09-18 21:49:50 -07:00
git-clone.txt Documentation: remote tracking branch -> remote-tracking branch 2012-10-25 06:55:46 -04:00
git-column.txt Documentation: spelling fixes 2012-06-19 11:35:19 -07:00
git-commit-tree.txt Revert "git-commit-tree(1): update synopsis" 2012-07-17 13:11:03 -07:00
git-commit.txt Merge branch 'mm/maint-doc-commit-edit' into maint 2012-11-20 10:14:55 -08:00
git-config.txt Sync with 1.7.11.6 2012-09-11 11:23:54 -07:00
git-count-objects.txt
git-credential-cache--daemon.txt command-list: mention git-credential-* helpers 2012-08-08 12:11:54 -07:00
git-credential-cache.txt command-list: mention git-credential-* helpers 2012-08-08 12:11:54 -07:00
git-credential-store.txt command-list: mention git-credential-* helpers 2012-08-08 12:11:54 -07:00
git-credential.txt Documentation: list git-credential in plumbing commands 2012-08-08 09:59:17 -07:00
git-cvsexportcommit.txt
git-cvsimport.txt git-cvsimport: allow author-specific timezones 2012-10-16 22:23:18 -07:00
git-cvsserver.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-daemon.txt Merge branch 'jc/daemon-access-hook' 2012-09-03 15:54:03 -07:00
git-describe.txt Documentation: do not mention .git/refs/* directories 2012-08-06 14:04:16 -07:00
git-diff-files.txt
git-diff-index.txt
git-diff-tree.txt
git-diff.txt
git-difftool.txt mergetool,difftool: Document --tool-help consistently 2012-08-10 08:07:41 -07:00
git-fast-export.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-fast-import.txt git-fast-import.txt: improve documentation for quoted paths 2012-11-29 11:49:51 -08:00
git-fetch-pack.txt Split over-long synopsis in git-fetch-pack.txt into several lines 2012-10-16 16:09:09 -07:00
git-fetch.txt
git-filter-branch.txt Documentation/git-filter-branch: Move note about effect of removing commits 2012-09-18 12:51:58 -07:00
git-fmt-merge-msg.txt
git-for-each-ref.txt Documentation: describe subject more precisely 2012-09-13 21:30:21 -07:00
git-format-patch.txt Doc format-patch: clarify --notes use case 2012-10-26 09:25:04 -04:00
git-fsck-objects.txt
git-fsck.txt Merge branch 'jc/tag-doc' into maint-1.7.11 2012-08-24 12:05:30 -07:00
git-gc.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-get-tar-commit-id.txt
git-grep.txt grep: add a grep.patternType configuration setting 2012-08-03 09:58:02 -07:00
git-gui.txt
git-hash-object.txt
git-help.txt
git-http-backend.txt
git-http-fetch.txt
git-http-push.txt
git-imap-send.txt
git-index-pack.txt index-pack: support multithreaded delta resolving 2012-05-07 15:48:15 -07:00
git-init-db.txt
git-init.txt
git-instaweb.txt
git-log.txt doc: move rev-list option -<n> from git-log.txt to rev-list-options.txt 2012-09-06 13:26:50 -07:00
git-lost-found.txt Documentation: do not mention .git/refs/* directories 2012-08-06 14:04:16 -07:00
git-ls-files.txt
git-ls-remote.txt ls-remote: document the '--get-url' option 2012-09-07 10:58:35 -07:00
git-ls-tree.txt
git-mailinfo.txt
git-mailsplit.txt
git-merge-base.txt merge-base: "--is-ancestor A B" 2012-08-31 11:45:33 -07:00
git-merge-file.txt
git-merge-index.txt
git-merge-one-file.txt
git-merge-tree.txt
git-merge.txt Documentation: remote tracking branch -> remote-tracking branch 2012-10-25 06:55:46 -04:00
git-mergetool--lib.txt
git-mergetool.txt Merge branch 'da/difftool-updates' 2012-08-27 11:55:17 -07:00
git-mktag.txt
git-mktree.txt
git-mv.txt
git-name-rev.txt
git-notes.txt Doc notes: Include the format-patch --notes option 2012-10-25 06:15:56 -04:00
git-p4.txt git-p4: add submit --conflict option and config varaiable 2012-09-16 21:52:53 -07:00
git-pack-objects.txt
git-pack-redundant.txt
git-pack-refs.txt Merge branch 'jc/tag-doc' into maint-1.7.11 2012-08-24 12:05:30 -07:00
git-parse-remote.txt
git-patch-id.txt
git-peek-remote.txt
git-prune-packed.txt
git-prune.txt
git-pull.txt man: git pull -r is a short for --rebase 2012-08-17 00:26:52 -07:00
git-push.txt Documentation/git-push.txt: clarify the "push from satellite" workflow 2012-11-27 22:39:08 -08:00
git-quiltimport.txt
git-read-tree.txt
git-rebase.txt rebase -i: Teach "--edit-todo" action 2012-09-17 20:59:14 -07:00
git-receive-pack.txt
git-reflog.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-relink.txt
git-remote-ext.txt
git-remote-fd.txt
git-remote-helpers.txt git-remote-helpers.txt: clarify options & ref list attributes 2012-12-07 13:54:15 -08:00
git-remote-testgit.txt
git-remote.txt remote: prefer subcommand name 'remove' to 'rm' 2012-09-06 13:23:22 -07:00
git-repack.txt
git-replace.txt Documentation: do not mention .git/refs/* directories 2012-08-06 14:04:16 -07:00
git-repo-config.txt
git-request-pull.txt
git-rerere.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-reset.txt doc: git-reset: make "<mode>" optional 2012-10-29 01:37:07 -04:00
git-rev-list.txt
git-rev-parse.txt Merge branch 'jc/sha1-name-more' 2012-07-22 12:55:07 -07:00
git-revert.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-rm.txt docs: move submodule section 2012-11-14 13:49:53 -08:00
git-send-email.txt git-send-email: introduce compose-encoding 2012-10-10 00:33:40 -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 Documentation: describe subject more precisely 2012-09-13 21:30:21 -07:00
git-show-branch.txt
git-show-index.txt
git-show-ref.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-show.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-stage.txt
git-stash.txt Documentation/git-stash.txt: add a missing verb 2012-12-10 08:18:25 -08:00
git-status.txt status: add --long output format option 2012-10-18 15:01:35 -07:00
git-stripspace.txt
git-submodule.txt Merge branch 'wtk/submodule-doc-fixup' 2012-11-21 13:25:42 -08:00
git-svn.txt Document git-svn fetch --log-window-size parameter 2012-10-26 09:32:53 -04:00
git-symbolic-ref.txt git symbolic-ref --delete $symref 2012-10-21 12:17:38 -07:00
git-tag.txt Merge branch 'jc/tag-doc' into maint-1.7.11 2012-08-24 12:05:30 -07:00
git-tar-tree.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-tools.txt
git-unpack-file.txt
git-unpack-objects.txt
git-update-index.txt
git-update-ref.txt
git-update-server-info.txt
git-upload-archive.txt
git-upload-pack.txt
git-var.txt ident: report passwd errors with a more friendly message 2012-05-22 09:08:20 -07:00
git-verify-pack.txt
git-verify-tag.txt
git-web--browse.txt
git-whatchanged.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
git-write-tree.txt
git.txt add global --literal-pathspecs option 2012-12-19 14:58:59 -08:00
gitattributes.txt Merge branch 'nd/attr-match-optim-more' 2012-11-09 12:42:25 -05:00
gitcli.txt gitcli: parse-options lets you omit tail of long options 2012-10-04 20:30:27 -07:00
gitcore-tutorial.txt Documentation: describe subject more precisely 2012-09-13 21:30:21 -07:00
gitcredentials.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
gitcvs-migration.txt
gitdiffcore.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
gitglossary.txt
githooks.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
gitignore.txt Merge branch 'nd/doc-ignore' into maint 2012-10-17 10:28:42 -07:00
gitk.txt
gitmodules.txt Teach "git submodule add" the --name option 2012-09-29 21:49:11 -07:00
gitnamespaces.txt
gitrepository-layout.txt Doc repository-layout: Show refs/replace 2012-10-25 06:56:39 -04:00
gitrevisions.txt
gittutorial-2.txt
gittutorial.txt Documentation: describe subject more precisely 2012-09-13 21:30:21 -07:00
gitweb.conf.txt Documentation: spelling fixes 2012-06-19 11:35:19 -07:00
gitweb.txt
gitworkflows.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
glossary-content.txt doc: A few minor copy edits. 2012-08-06 15:34:20 -07:00
howto-index.sh
i18n.txt
install-doc-quick.sh
install-webdoc.sh
mailmap.txt
Makefile Remove duplicate entry in ./Documentation/Makefile 2012-12-19 10:24:23 -08: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-config.txt Documentation: remote tracking branch -> remote-tracking branch 2012-10-25 06:55:46 -04:00
merge-options.txt
merge-strategies.txt merge: teach -Xours/-Xtheirs to binary ll-merge driver 2012-09-08 21:27:19 -07:00
pretty-formats.txt Documentation: Document signature showing options 2012-09-20 10:28:51 -07:00
pretty-options.txt Documentation: Document signature showing options 2012-09-20 10:28:51 -07:00
pull-fetch-param.txt docs: stop using asciidoc no-inline-literal 2012-04-26 13:19:06 -07:00
rev-list-options.txt log --grep: accept --basic-regexp and --perl-regexp 2012-10-09 23:21:30 -07:00
revisions.txt Merge branch 'nd/branch-v-alignment' 2012-09-07 11:10:02 -07:00
sequencer.txt
SubmittingPatches Doc SubmittingPatches: Mention --notes option after "cover letter" 2012-10-25 06:15:56 -04:00
urls-remotes.txt
urls.txt Git url doc: mark ftp/ftps as read-only and deprecate them 2012-10-08 14:18:19 -07:00
user-manual.conf docs: monospace listings in docbook output 2012-08-07 14:30:52 -07:00
user-manual.txt Doc User-Manual: Patch cover letter, three dashes, and --notes 2012-10-26 10:31:38 -04:00