1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-30 22:07:53 +01:00
git/Documentation
Martin Ågren e605077260 doc-diff: add --cut-header-footer
AsciiDoc and Asciidoctor do not agree on what to write in the header and
footer of each man-page, i.e., the very first and the very last line of
*.[157]. Those differences can certainly be interesting in their own
right, but they clutter the output of `./doc-diff --from-asciidoc
--to-asciidoctor HEAD HEAD` quite a bit since the diff contains some
10-15 lines of noise per file diffed.

Teach doc-diff to cut away the first two and last two lines, i.e., the
header/footer and the empty line immediately following/preceding it.
Because Asciidoctor uses an extra empty line compared to AsciiDoc,
remove one more line at each end of the file, but only if it's empty.

An alternative approach might be to pass down `--no-header-footer`,
which both AsciiDoc and Asciidoctor understand, but it has some
drawbacks. First of all, the result doesn't build -- `xmlto` stumbles on
the resulting xml since it has multiple root elements. Second, it cuts
too much -- dropping the header loses the synopsis, which would be
interesting to diff.

Like in the previous commit, encode this option into the directory name
of the "installed" and "rendered" files. Otherwise, we wouldn't be able
to trust that what we use out of that cache actually corresponds to the
options given for this run. (We could optimize this caching a little
since this flag doesn't affect the contents of "installed" at all, but
let's punt on that.)

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-18 15:54:17 +09:00
..
config Merge branch 'wh/author-committer-ident-config' 2019-03-07 09:59:53 +09:00
howto Merge branch 'uk/merge-subtree-doc-update' into maint 2018-11-21 22:58:08 +09:00
RelNotes The second batch 2019-03-11 16:18:22 +09:00
technical Merge branch 'jh/trace2' 2019-03-07 09:59:56 +09:00
.gitattributes
.gitignore Doc: auto-detect changed build flags 2019-03-18 15:54:17 +09:00
asciidoc.conf
asciidoctor-extensions.rb
blame-options.txt
build-docdep.perl
cat-texi.perl
cmd-list.perl
CodingGuidelines Merge branch 'jc/how-to-document-api' 2018-10-19 13:34:05 +09:00
config.txt Merge branch 'nd/packobjectshook-doc-fix' into maint 2018-11-21 22:58:01 +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-2' 2019-03-07 09:59:58 +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 Merge branch 'ab/fetch-tags-noclobber' 2018-09-17 13:54:00 -07:00
fix-texi.perl
git-add.txt doc: tidy asciidoc style 2019-01-23 11:37:29 -08:00
git-am.txt Merge branch 'nd/rebase-show-current-patch' 2018-03-06 14:54:02 -08:00
git-annotate.txt Use proper syntax for replaceables in command docs 2018-05-25 17:16:47 +09:00
git-apply.txt Merge branch 'nd/diff-apply-ita' 2018-06-25 13:22:36 -07:00
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 Merge branch 'ak/bisect-doc-typofix' 2018-04-25 13:28:56 +09:00
git-blame.txt diff: --indent-heuristic is no longer experimental 2017-11-02 14:51:24 +09:00
git-branch.txt Merge branch 'du/branch-show-current' 2019-03-07 09:59:54 +09:00
git-bundle.txt doc: keep first level section header in upper case 2018-05-02 17:03:33 +09:00
git-cat-file.txt Merge branch 'dt/cat-file-batch-ambiguous' 2019-02-06 22:05:21 -08:00
git-check-attr.txt Use proper syntax for replaceables in command docs 2018-05-25 17:16:47 +09:00
git-check-ignore.txt Use proper syntax for replaceables in command docs 2018-05-25 17:16:47 +09:00
git-check-mailmap.txt Use proper syntax for replaceables in command docs 2018-05-25 17:16:47 +09:00
git-check-ref-format.txt Doc/check-ref-format: clarify information about @{-N} syntax 2017-12-19 10:00:45 -08:00
git-checkout-index.txt
git-checkout.txt Merge branch 'tg/checkout-no-overlay' 2019-03-07 09:59:51 +09:00
git-cherry-pick.txt doc: tidy asciidoc style 2019-01-23 11:37:29 -08:00
git-cherry.txt
git-citool.txt
git-clean.txt
git-clone.txt Documentation/clone: document ignored configuration variables 2018-11-16 13:15:21 +09: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
git-commit.txt git-commit.txt: better description what it does 2019-02-04 10:00:01 -08:00
git-config.txt worktree: add per-worktree config files 2018-10-22 13:17:04 +09:00
git-count-objects.txt
git-credential-cache--daemon.txt
git-credential-cache.txt Use proper syntax for replaceables in command docs 2018-05-25 17:16:47 +09:00
git-credential-store.txt Use proper syntax for replaceables in command docs 2018-05-25 17:16:47 +09:00
git-credential.txt
git-cvsexportcommit.txt
git-cvsimport.txt
git-cvsserver.txt Use proper syntax for replaceables in command docs 2018-05-25 17:16:47 +09:00
git-daemon.txt daemon: add --log-destination=(stderr|syslog|none) 2018-02-05 10:30:44 -08:00
git-describe.txt git-describe.1: clarify that "human readable" is also git-readable 2018-09-21 09:32:21 -07:00
git-diff-files.txt
git-diff-index.txt doc: keep first level section header in upper case 2018-05-02 17:03:33 +09:00
git-diff-tree.txt Merge branch 'en/combined-all-paths' 2019-03-07 09:59:54 +09:00
git-diff.txt doc: tidy asciidoc style 2019-01-23 11:37:29 -08:00
git-difftool.txt
git-fast-export.txt fast-export: add a --show-original-ids option to show original names 2018-11-17 18:43:52 +09:00
git-fast-import.txt fast-export: add a --show-original-ids option to show original names 2018-11-17 18:43:52 +09:00
git-fetch-pack.txt Documentation: fix several one-character-off spelling errors 2018-04-09 14:15:02 +09:00
git-fetch.txt doc: tidy asciidoc style 2019-01-23 11:37:29 -08:00
git-filter-branch.txt Merge branch 'nd/doc-header' 2018-05-23 14:38: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 doc: tidy asciidoc style 2019-01-23 11:37:29 -08:00
git-fsck-objects.txt
git-fsck.txt prefer "hash mismatch" to "sha1 mismatch" 2019-01-08 09:41:06 -08:00
git-gc.txt Merge branch 'rd/gc-prune-doc-fix' 2019-03-11 16:16:26 +09:00
git-get-tar-commit-id.txt
git-grep.txt grep: add -r/--[no-]recursive 2018-10-03 21:25:57 -07:00
git-gui.txt
git-hash-object.txt
git-help.txt doc: tidy asciidoc style 2019-01-23 11:37:29 -08:00
git-http-backend.txt
git-http-fetch.txt http-fetch: make -a standard behaviour 2018-04-24 10:55:02 +09:00
git-http-push.txt doc: keep first level section header in upper case 2018-05-02 17:03:33 +09:00
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 doc: keep first level section header in upper case 2018-05-02 17:03:33 +09:00
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 Merge branch 'jk/trailer-fixes' into maint 2018-11-21 22:57:42 +09:00
git-log.txt Add 'human' date format documentation 2019-01-22 14:16:17 -08:00
git-ls-files.txt Merge branch 'ah/misc-doc-updates' 2018-05-23 14:38:23 +09:00
git-ls-remote.txt Merge branch 'bw/server-options' 2018-05-23 14:38:15 +09:00
git-ls-tree.txt
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 config.txt: move merge-config.txt to config/ 2018-10-29 10:17:03 +09:00
git-mergetool--lib.txt
git-mergetool.txt mergetool: accept -g/--[no-]gui as arguments 2018-10-25 14:01:10 +09:00
git-mktag.txt
git-mktree.txt Documentation: normalize spelling of 'normalised' 2018-04-09 14:15:07 +09:00
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 doc: keep first level section header in upper case 2018-05-02 17:03:33 +09:00
git-notes.txt Documentation: spelling and grammar fixes 2018-06-22 14:26:23 -07: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 doc: remove unsupported parameter from patch-id 2017-07-28 14:41:32 -07:00
git-prune-packed.txt
git-prune.txt doc: keep first level section header in upper case 2018-05-02 17:03:33 +09:00
git-pull.txt Use proper syntax for replaceables in command docs 2018-05-25 17:16:47 +09: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 doc: keep first level section header in upper case 2018-05-02 17:03:33 +09:00
git-rebase.txt Merge branch 'js/rebase-recreate-merge' 2019-03-11 16:16:26 +09:00
git-receive-pack.txt doc: keep first level section header in upper case 2018-05-02 17:03:33 +09:00
git-reflog.txt reflog expire: cover reflog from all worktrees 2018-10-22 13:32:54 +09:00
git-remote-ext.txt doc: keep first level section header in upper case 2018-05-02 17:03:33 +09:00
git-remote-fd.txt
git-remote-helpers.txto
git-remote-testgit.txt
git-remote.txt Merge branch 'nd/remote-update-doc' 2018-06-04 21:39:49 +09:00
git-repack.txt Merge branch 'cc/delta-islands' 2018-09-17 13:53:55 -07:00
git-replace.txt replace: introduce --convert-graft-file 2018-04-30 11:12:30 +09:00
git-request-pull.txt doc: keep first level section header in upper case 2018-05-02 17:03:33 +09:00
git-rerere.txt rerere: add note about files with existing conflict markers 2018-08-29 09:03:29 -07:00
git-reset.txt doc: tidy asciidoc style 2019-01-23 11:37:29 -08:00
git-rev-list.txt rev-list: add list-objects filtering support 2017-11-22 14:11:57 +09:00
git-rev-parse.txt Use proper syntax for replaceables in command docs 2018-05-25 17:16:47 +09:00
git-revert.txt
git-rm.txt treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00
git-send-email.txt doc: tidy asciidoc style 2019-01-23 11:37:29 -08:00
git-send-pack.txt doc: keep first level section header in upper case 2018-05-02 17:03:33 +09:00
git-sh-i18n--envsubst.txt
git-sh-i18n.txt
git-sh-setup.txt
git-shell.txt doc: keep first level section header in upper case 2018-05-02 17:03:33 +09:00
git-shortlog.txt git-[short]log.txt: unify quoted standalone -- 2018-04-18 12:49:26 +09:00
git-show-branch.txt doc: fix small typo in git show-branch 2018-10-18 12:26:51 +09:00
git-show-index.txt show-index: update documentation for index v2 2018-05-29 00:28:22 +09:00
git-show-ref.txt git-show-ref.txt: fix order of flags 2019-01-10 10:29:05 -08:00
git-show.txt Use proper syntax for replaceables in command docs 2018-05-25 17:16:47 +09:00
git-stage.txt
git-stash.txt git-stash.txt: remove extra square bracket 2018-03-27 19:09:13 -07:00
git-status.txt git-status.txt: render tables correctly under Asciidoctor 2018-12-26 15:29:30 -08:00
git-stripspace.txt
git-submodule.txt submodule: document default behavior 2019-02-15 09:55:27 -08:00
git-svn.txt Documentation: spelling and grammar fixes 2018-06-22 14:26:23 -07: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
git-upload-archive.txt
git-upload-pack.txt doc: tidy asciidoc style 2019-01-23 11:37:29 -08:00
git-var.txt doc: keep first level section header in upper case 2018-05-02 17:03:33 +09:00
git-verify-commit.txt
git-verify-pack.txt
git-verify-tag.txt
git-web--browse.txt Use proper syntax for replaceables in command docs 2018-05-25 17:16:47 +09:00
git-whatchanged.txt
git-worktree.txt Merge branch 'nd/per-worktree-ref-iteration' 2018-11-13 22:37:26 +09:00
git-write-tree.txt
git.txt Merge branch 'ah/doc-updates' into maint 2018-11-21 22:58:07 +09:00
gitattributes.txt Merge branch 'yb/utf-16le-bom-spellfix' 2019-03-11 16:16:24 +09:00
gitcli.txt Use proper syntax for replaceables in command docs 2018-05-25 17:16:47 +09:00
gitcore-tutorial.txt treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00
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 Documentation: spelling and grammar fixes 2018-06-22 14:26:23 -07:00
gitglossary.txt
githooks.txt mention use of "hooks.allownonascii" in "man githooks" 2019-02-21 09:41:21 -08:00
gitignore.txt Merge branch 'nd/wildmatch-double-asterisk' 2018-11-13 22:37:19 +09:00
gitk.txt doc: convert [\--] to [--] 2018-04-18 12:49:26 +09:00
gitmodules.txt doc: fix inappropriate monospace formatting 2018-10-23 12:23:09 +09:00
gitnamespaces.txt
gitremote-helpers.txt Merge branch 'bw/protocol-v2' 2018-05-08 15:59:16 +09:00
gitrepository-layout.txt doc: move extensions.worktreeConfig to the right place 2018-11-16 14:10:31 +09:00
gitrevisions.txt push doc: correct lies about how push refspecs work 2018-08-31 14:04:06 -07:00
gitsubmodules.txt doc: fix inappropriate monospace formatting 2018-10-23 12:23:09 +09:00
gittutorial-2.txt
gittutorial.txt treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00
gitweb.conf.txt Merge branch 'do/gitweb-strict-export-conf-doc' 2019-01-14 15:29:33 -08:00
gitweb.txt
gitworkflows.txt Merge branch 'km/doc-workflows-typofix' 2018-06-18 10:18:42 -07:00
glossary-content.txt tree-walk: support :(attr) matching 2018-11-19 10:50:33 +09:00
howto-index.sh
i18n.txt doc: camelCase the i18n config variables to improve readability 2017-07-17 15:11:26 -07:00
install-doc-quick.sh install-doc-quick: allow specifying what ref to install 2017-12-12 16:49:40 -08:00
install-webdoc.sh
line-range-format.txt
lint-gitlink.perl
mailmap.txt
Makefile Doc: auto-detect changed build flags 2019-03-18 15:54:17 +09: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-options.txt: correct wording of --no-commit option 2019-02-21 11:08:23 -08:00
merge-strategies.txt merge: add merge.renames config setting 2018-05-08 16:19:41 +09: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 Merge branch 'en/combined-all-paths' 2019-03-07 09:59:54 +09:00
revisions.txt Merge branch 'wc/find-commit-with-pattern-on-detached-head' 2018-07-24 14:50:49 -07:00
sequencer.txt
SubmittingPatches SubmittingPatches: mention doc-diff 2018-08-21 12:54:33 -07:00
texi.xsl
transfer-data-leaks.txt
urls-remotes.txt
urls.txt
user-manual.conf
user-manual.txt checkout: describe_detached_head: remove ellipsis after committish 2017-12-06 07:32:40 -08:00