git/Documentation
John Cai a4cf900ee7 diff: teach diff to read algorithm from diff driver
It can be useful to specify diff algorithms per file type. For example,
one may want to use the minimal diff algorithm for .json files, another
for .c files, etc.

The diff machinery already checks attributes for a diff driver. Teach
the diff driver parser a new type "algorithm" to look for in the
config, which will be used if a driver has been specified through the
attributes.

Enforce precedence of the diff algorithm by favoring the command line
option, then looking at the driver attributes & config combination, then
finally the diff.algorithm config.

To enforce precedence order, use a new `ignore_driver_algorithm` member
during options parsing to indicate the diff algorithm was set via command
line args.

Signed-off-by: John Cai <johncai86@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-21 09:29:10 -08:00
..
RelNotes Git 2.39.2 2023-02-06 09:43:41 +01:00
config Merge branch 'jt/submodule-on-demand' 2022-11-23 11:22:25 +09:00
howto Merge branch 'tb/howto-maintain-git-fixes' 2022-11-23 11:22:24 +09:00
includes docs: add and use include template for config/* includes 2022-09-07 09:46:05 -07:00
mergetools
…
technical Merge branch 'en/sparse-checkout-design' 2022-11-18 18:44:01 -05:00
.gitattributes
…
.gitignore
…
CodingGuidelines Merge branch 'ab/doc-synopsis-and-cmd-usage' 2022-10-28 11:26:54 -07:00
Makefile Merge branch 'ps/gnumake-4.4-fix' 2022-11-30 10:57:19 +09:00
MyFirstContribution.txt Documentation: fix typo 2022-11-14 18:14:58 -05:00
MyFirstObjectWalk.txt Documentation: clean up a few misspelled word typos 2022-09-21 10:28:35 -07:00
ReviewingGuidelines.txt Documentation: add ReviewingGuidelines 2022-09-19 14:36:08 -07:00
SubmittingPatches SubmittingPatches: use usual capitalization in the log message body 2022-10-07 14:59:25 -07:00
ToolsForGit.txt Documentation/ToolsForGit.txt: Tools for developing Git 2022-04-21 09:50:25 -07:00
asciidoc.conf
…
asciidoctor-extensions.rb
…
blame-options.txt
…
build-docdep.perl Documentation/build-docdep.perl: generate sorted output 2022-10-21 11:39:38 -07:00
cat-texi.perl
…
cmd-list.perl cmd-list.perl: fix identifying man sections 2022-09-23 10:01:07 -07:00
config.txt Merge branch 'ds/bundle-uri-3' 2022-10-30 21:04:44 -04:00
date-formats.txt
…
diff-format.txt diff-format.txt: correct misleading wording 2022-06-13 11:57:03 -07:00
diff-generate-patch.txt
…
diff-options.txt
…
doc-diff
…
docbook-xsl.css
…
docbook.xsl
…
everyday.txto
…
fetch-options.txt
…
fix-texi.perl
…
fsck-msgids.txt fsck: document the new `gitattributes` message IDs 2023-01-16 12:03:14 -08:00
git-add.txt Merge branch 'ab/dedup-config-and-command-docs' 2022-09-14 12:56:40 -07:00
git-am.txt Merge branch 'ab/dedup-config-and-command-docs' 2022-09-14 12:56:40 -07:00
git-annotate.txt doc txt & -h consistency: make "annotate" consistent 2022-10-13 09:32:57 -07:00
git-apply.txt apply docs: de-duplicate configuration sections 2022-09-07 09:46:05 -07:00
git-archimport.txt
…
git-archive.txt archive-tar: use internal gzip by default 2022-06-15 13:19:47 -07:00
git-bisect-lk2009.txt
…
git-bisect.txt
…
git-blame.txt docs: add CONFIGURATION sections that fuzzy map to built-ins 2022-09-07 09:46:07 -07:00
git-branch.txt docs: add CONFIGURATION sections that fuzzy map to built-ins 2022-09-07 09:46:07 -07:00
git-bugreport.txt builtin/bugreport.c: create '--diagnose' option 2022-08-12 13:20:02 -07:00
git-bundle.txt Documentation: fix various repeat word typos 2022-09-12 11:04:55 -07:00
git-cat-file.txt Merge branch 'tb/cat-file-z' 2022-08-05 15:52:14 -07: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 docs: add CONFIGURATION sections that fuzzy map to built-ins 2022-09-07 09:46:07 -07:00
git-cherry-pick.txt doc: consolidate --rerere-autoupdate description 2022-08-03 13:47:11 -07:00
git-cherry.txt
…
git-citool.txt
…
git-clean.txt Merge branch 'ab/doc-synopsis-and-cmd-usage' 2022-10-28 11:26:54 -07:00
git-clone.txt Merge branch 'ab/dedup-config-and-command-docs' 2022-09-14 12:56:40 -07:00
git-column.txt docs: add CONFIGURATION sections that fuzzy map to built-ins 2022-09-07 09:46:07 -07:00
git-commit-graph.txt Merge branch 'ab/doc-synopsis-and-cmd-usage' 2022-10-28 11:26:54 -07:00
git-commit-tree.txt
…
git-commit.txt docs: add CONFIGURATION sections that map to a built-in 2022-09-07 09:46:06 -07:00
git-config.txt Documentation: define protected configuration 2022-07-14 15:08:29 -07:00
git-count-objects.txt
…
git-credential-cache--daemon.txt doc txt & -h consistency: fix mismatching labels 2022-10-13 09:32:56 -07:00
git-credential-cache.txt Documentation: increase example cache timeout to 1 hour 2022-11-09 21:28:53 -05:00
git-credential-store.txt
…
git-credential.txt docs: clarify that credential discards unrecognised attributes 2022-11-12 23:57:34 -05:00
git-cvsexportcommit.txt
…
git-cvsimport.txt
…
git-cvsserver.txt git-cvsserver: clarify directory list 2022-07-19 12:45:31 -07:00
git-daemon.txt daemon: clarify directory arguments 2022-07-19 12:45:31 -07:00
git-describe.txt
…
git-diagnose.txt builtin/diagnose.c: add '--mode' option 2022-08-12 13:20:02 -07:00
git-diff-files.txt doc txt & -h consistency: correct padding around "[]()" 2022-10-13 09:32:55 -07:00
git-diff-index.txt diff-index.txt: update raw output format in examples 2022-06-13 11:59:16 -07:00
git-diff-tree.txt
…
git-diff.txt Merge branch 'rs/diff-caret-bang-with-parents' 2022-10-25 17:11:43 -07:00
git-difftool.txt difftool docs: de-duplicate configuration sections 2022-09-07 09:46:06 -07:00
git-fast-export.txt doc SYNOPSIS: consistently use ' for commands 2022-10-13 09:32:54 -07:00
git-fast-import.txt docs: add CONFIGURATION sections that map to a built-in 2022-09-07 09:46:06 -07:00
git-fetch-pack.txt
…
git-fetch.txt docs: add CONFIGURATION sections that fuzzy map to built-ins 2022-09-07 09:46:07 -07:00
git-filter-branch.txt
…
git-fmt-merge-msg.txt
…
git-for-each-ref.txt
…
git-for-each-repo.txt
…
git-format-patch.txt format-patch: learn format.forceInBodyFrom configuration variable 2022-08-29 14:39:13 -07:00
git-fsck-objects.txt
…
git-fsck.txt fsck: document msg-id 2022-10-25 15:44:18 -07:00
git-fsmonitor--daemon.txt fsmonitor: add documentation for allowRemote and socketDir options 2022-10-05 11:05:23 -07:00
git-gc.txt docs: add and use include template for config/* includes 2022-09-07 09:46:05 -07:00
git-get-tar-commit-id.txt
…
git-grep.txt grep docs: de-duplicate configuration sections 2022-09-07 09:46:05 -07:00
git-gui.txt
…
git-hash-object.txt doc txt & -h consistency: correct padding around "[]()" 2022-10-13 09:32:55 -07:00
git-help.txt git docs: add a category for file formats, protocols and interfaces 2022-08-04 14:12:23 -07:00
git-hook.txt
…
git-http-backend.txt
…
git-http-fetch.txt
…
git-http-push.txt
…
git-imap-send.txt docs: add and use include template for config/* includes 2022-09-07 09:46:05 -07:00
git-index-pack.txt
…
git-init-db.txt
…
git-init.txt docs: add CONFIGURATION sections that fuzzy map to built-ins 2022-09-07 09:46:07 -07:00
git-instaweb.txt
…
git-interpret-trailers.txt Merge branch 'ab/doc-synopsis-and-cmd-usage' 2022-10-28 11:26:54 -07:00
git-log.txt Merge branch 'ab/dedup-config-and-command-docs' 2022-09-14 12:56:40 -07:00
git-ls-files.txt ls-files: fix --ignored and --killed flags in synopsis 2022-11-07 21:55:06 -05:00
git-ls-remote.txt
…
git-ls-tree.txt ls-tree doc: document interaction with submodules 2022-04-08 11:21:11 -07:00
git-mailinfo.txt docs: add CONFIGURATION sections that map to a built-in 2022-09-07 09:46:06 -07:00
git-mailsplit.txt
…
git-maintenance.txt maintenance: add option to register in a specific config 2022-11-14 22:39:25 -05:00
git-merge-base.txt doc txt & -h consistency: correct padding around "[]()" 2022-10-13 09:32:55 -07:00
git-merge-file.txt
…
git-merge-index.txt
…
git-merge-one-file.txt
…
git-merge-tree.txt merge-tree: support multiple batched merges with --stdin 2022-10-22 22:21:26 -07:00
git-merge.txt Merge branch 'ab/dedup-config-and-command-docs' 2022-09-14 12:56:40 -07:00
git-mergetool--lib.txt
…
git-mergetool.txt docs: add and use include template for config/* includes 2022-09-07 09:46:05 -07:00
git-mktag.txt
…
git-mktree.txt
…
git-multi-pack-index.txt midx.c: prevent `expire` from removing the cruft pack 2022-09-21 10:21:46 -07:00
git-mv.txt doc txt & -h consistency: fix mismatching labels 2022-10-13 09:32:56 -07:00
git-name-rev.txt
…
git-notes.txt notes docs: de-duplicate and combine configuration sections 2022-09-07 09:46:06 -07:00
git-p4.txt git-p4: improve encoding handling to support inconsistent encodings 2022-05-04 10:30:01 -07:00
git-pack-objects.txt builtin/pack-objects.c: --cruft without expiration 2022-05-26 15:48:26 -07:00
git-pack-redundant.txt doc: use 'object database' not ODB or abbreviation 2022-10-30 19:58:46 -04:00
git-pack-refs.txt
…
git-patch-id.txt builtin: patch-id: add --verbatim as a command mode 2022-10-24 15:44:20 -07:00
git-prune-packed.txt doc txt & -h consistency: correct padding around "[]()" 2022-10-13 09:32:55 -07:00
git-prune.txt
…
git-pull.txt
…
git-push.txt Doc: document push.recurseSubmodules=only 2022-11-14 16:55:50 -05:00
git-quiltimport.txt
…
git-range-diff.txt range-diff: optionally accept pathspecs 2022-08-26 09:49:26 -07:00
git-read-tree.txt doc txt & -h consistency: make "read-tree" consistent 2022-10-13 09:32:56 -07:00
git-rebase.txt Merge branch 'pw/rebase-keep-base-fixes' 2022-10-30 21:04:42 -04:00
git-receive-pack.txt doc txt & -h consistency: use "git foo" form, not "git-foo" 2022-10-13 09:32:57 -07:00
git-reflog.txt reflog doc: list real subcommands up-front 2022-10-13 09:32:58 -07:00
git-remote-ext.txt
…
git-remote-fd.txt
…
git-remote-helpers.txto
…
git-remote.txt builtin/remote.c: teach `-v` to list filters for promisor remotes 2022-05-09 10:53:58 -07:00
git-repack.txt builtin/repack.c: implement `--expire-to` for storing pruned objects 2022-10-24 13:39:42 -07:00
git-replace.txt
…
git-request-pull.txt
…
git-rerere.txt doc txt & -h consistency: make "rerere" consistent 2022-10-13 09:32:56 -07:00
git-reset.txt
…
git-restore.txt
…
git-rev-list.txt doc txt & -h consistency: add or fix optional "--" syntax 2022-10-13 09:32:56 -07:00
git-rev-parse.txt rev-parse: add `--exclude-hidden=` option 2022-11-17 16:22:52 -05:00
git-revert.txt Merge branch 'ab/doc-synopsis-and-cmd-usage' 2022-11-29 10:41:06 +09:00
git-rm.txt
…
git-send-email.txt docs: git-send-email: difference between ssl and tls smtp-encryption 2022-10-12 11:08:37 -07:00
git-send-pack.txt doc txt & -h consistency: add missing options and labels 2022-10-13 09:32:56 -07:00
git-sh-i18n--envsubst.txt
…
git-sh-i18n.txt
…
git-sh-setup.txt
…
git-shell.txt
…
git-shortlog.txt shortlog: support arbitrary commit format `--group`s 2022-10-24 14:48:05 -07:00
git-show-branch.txt Merge branch 'ab/doc-synopsis-and-cmd-usage' 2022-10-28 11:26:54 -07:00
git-show-index.txt
…
git-show-ref.txt doc txt & -h consistency: correct padding around "[]()" 2022-10-13 09:32:55 -07:00
git-show.txt
…
git-sparse-checkout.txt doc txt & -h consistency: add missing options and labels 2022-10-13 09:32:56 -07:00
git-stage.txt
…
git-stash.txt Merge branch 'ab/doc-synopsis-and-cmd-usage' 2022-10-28 11:26:54 -07:00
git-status.txt doc txt & -h consistency: use "<options>", not "<options>..." 2022-10-13 09:32:55 -07:00
git-stripspace.txt
…
git-submodule.txt
…
git-svn.txt
…
git-switch.txt docs: add CONFIGURATION sections that fuzzy map to built-ins 2022-09-07 09:46:07 -07:00
git-symbolic-ref.txt symbolic-ref: teach "--[no-]recurse" option 2022-10-09 12:31:24 -07:00
git-tag.txt doc txt & -h consistency: fix mismatching labels 2022-10-13 09:32:56 -07:00
git-tools.txt
…
git-unpack-file.txt
…
git-unpack-objects.txt
…
git-update-index.txt Documentation: fix various repeat word typos 2022-09-12 11:04:55 -07:00
git-update-ref.txt
…
git-update-server-info.txt doc txt & -h consistency: add missing options and labels 2022-10-13 09:32:56 -07:00
git-upload-archive.txt doc txt & -h consistency: fix mismatching labels 2022-10-13 09:32:56 -07:00
git-upload-pack.txt Documentation: fix various repeat word typos 2022-09-12 11:04:55 -07:00
git-var.txt doc txt & -h consistency: correct padding around "[]()" 2022-10-13 09:32:55 -07:00
git-verify-commit.txt doc txt & -h consistency: add missing options and labels 2022-10-13 09:32:56 -07:00
git-verify-pack.txt doc txt & -h consistency: correct padding around "[]()" 2022-10-13 09:32:55 -07:00
git-verify-tag.txt doc txt & -h consistency: add missing options and labels 2022-10-13 09:32:56 -07:00
git-version.txt
…
git-web--browse.txt
…
git-whatchanged.txt
…
git-worktree.txt doc txt & -h consistency: word-wrap 2022-10-13 09:32:55 -07:00
git-write-tree.txt
…
git.txt Merge branch 'jc/environ-docs' into maint-2.38 2022-10-27 15:24:09 -07:00
gitattributes.txt diff: teach diff to read algorithm from diff driver 2023-02-21 09:29:10 -08:00
gitcli.txt
…
gitcore-tutorial.txt
…
gitcredentials.txt Merge branch 'mh/gitcredentials-generate' 2022-11-23 11:22:25 +09:00
gitcvs-migration.txt
…
gitdiffcore.txt
…
giteveryday.txt
…
gitfaq.txt
…
gitformat-bundle.txt docs: move protocol-related docs to man section 5 2022-08-04 14:12:23 -07:00
gitformat-chunk.txt docs: move pack format docs to man section 5 2022-08-04 14:12:24 -07:00
gitformat-commit-graph.txt doc: use "commit-graph" hyphenation consistently 2022-10-30 19:58:40 -04:00
gitformat-index.txt Merge branch 'ab/tech-docs-to-help' 2022-08-14 23:19:28 -07:00
gitformat-pack.txt docs: move cruft pack docs to gitformat-pack 2022-08-04 14:12:24 -07:00
gitformat-signature.txt docs: move signature docs to man section 5 2022-08-04 14:12:24 -07:00
gitglossary.txt
…
githooks.txt
…
gitignore.txt
…
gitk.txt
…
gitmailmap.txt
…
gitmodules.txt
…
gitnamespaces.txt
…
gitprotocol-capabilities.txt docs: fix a few recently broken links 2022-09-16 08:38:03 -07:00
gitprotocol-common.txt docs: move protocol-related docs to man section 5 2022-08-04 14:12:23 -07:00
gitprotocol-http.txt docs: move http-protocol docs to man section 5 2022-08-04 14:12:24 -07:00
gitprotocol-pack.txt docs: move http-protocol docs to man section 5 2022-08-04 14:12:24 -07:00
gitprotocol-v2.txt docs: fix a few recently broken links 2022-09-16 08:38:03 -07:00
gitremote-helpers.txt remote-curl: add 'get' capability 2022-08-10 14:07:37 -07:00
gitrepository-layout.txt
…
gitrevisions.txt
…
gitsubmodules.txt
…
gittutorial-2.txt
…
gittutorial.txt
…
gitweb.conf.txt
…
gitweb.txt
…
gitworkflows.txt
…
glossary-content.txt glossary: add reachability bitmap description 2022-10-30 19:58:46 -04:00
howto-index.sh
…
i18n.txt
…
install-doc-quick.sh
…
install-webdoc.sh
…
line-range-format.txt
…
line-range-options.txt
…
lint-fsck-msgids.perl Documentation: add lint-fsck-msgids 2022-10-25 15:44:19 -07:00
lint-gitlink.perl
…
lint-man-end-blurb.perl
…
lint-man-section-order.perl git docs: add a category for file formats, protocols and interfaces 2022-08-04 14:12:23 -07:00
manpage-base-url.xsl.in
…
manpage-bold-literal.xsl
…
manpage-normal.xsl
…
manpage-quote-apos.xsl
…
manpage.xsl
…
merge-options.txt
…
merge-strategies.txt
…
object-format-disclaimer.txt
…
pretty-formats.txt
…
pretty-options.txt
…
pull-fetch-param.txt
…
ref-reachability-filters.txt
…
rerere-options.txt doc: clarify rerere-autoupdate 2022-08-03 13:57:25 -07:00
rev-list-description.txt
…
rev-list-options.txt revision: add new parameter to exclude hidden refs 2022-11-17 16:22:52 -05:00
revisions.txt revisions.txt: unspecify order of resolved parts of ^! 2022-10-01 15:58:36 -07:00
scalar.txt scalar: include in standard Git build & installation 2022-09-02 10:02:55 -07:00
sequencer.txt
…
signoff-option.txt
…
texi.xsl
…
trace2-target-values.txt
…
transfer-data-leaks.txt
…
urls-remotes.txt
…
urls.txt
…
user-manual.conf
…
user-manual.txt docs: fix a few recently broken links 2022-09-16 08:38:03 -07:00