Documentation: Split description of pretty formats of commit log
PATCH 1/1 Documentation: Split description of pretty formats of commit log
Split description of pretty formats into list of pretty options (--pretty and --encoding) in new file Documentation/pretty-options.txt and description of formats itself as a separate "PRETTY FORMATS" section in pretty-formats.txt
While at it correct formatting a bit, to be better laid out in the resulting manpages: git-rev-list(1), git-show(1), git-log(1) and git-diff-tree(1). Those manpages now include pretty options in the same place as it was before, and description of formats just after all options.
Inspired by the split into two filesdocumentation for merge strategies:Documentation/merge-options.txt and Documentation/merge-strategies.txt
---
I was fed up with the fact that description of pretty formats takes so much place for some manpages directly in the middle of other options, making manpage unnecessary hard to read. So here there are the patch for this.
Note: I have tested only manpage output; HTML output style might be a bit broken, but I think it was broken before.
Most of the patch Documentation/pretty-formats.txt is just reformatting.
Documentation/git-diff-tree.txt | 5 ++- Documentation/git-log.txt | 5 ++- Documentation/git-rev-list.txt | 6 +++- Documentation/git-show.txt | 3 ++ Documentation/pretty-formats.txt | 70 +++++++++++++++++-------------------- Documentation/pretty-options.txt | 14 +++++++ 6 files changed, 62 insertions(+), 41 deletions(-) create mode 100644 Documentation/pretty-options.txt
Documentation/git-diff-tree.txt +4 -1
@@ -73,7 +73,7 @@ separated with a single space are given. This flag causes "git-diff-tree --stdin" to also show the commit message before the differences. -include::pretty-formats.txt[] +include::pretty-options.txt[] --no-commit-id:: git-diff-tree outputs a line with the commit ID when
@@ -104,6 +104,9 @@ include::pretty-formats.txt[] if the diff itself is empty. +include::pretty-formats.txt[] + + Limiting Output --------------- If you're only interested in differences in a subset of files, for
Documentation/git-log.txt +4 -1
@@ -25,7 +25,7 @@ This manual page describes only the most frequently used options. OPTIONS ------- -include::pretty-formats.txt[] +include::pretty-options.txt[] -<n>:: Limits the number of commits to show.
@@ -58,6 +58,9 @@ include::pretty-formats.txt[] Show only commits that affect the specified paths. +include::pretty-formats.txt[] + + Examples -------- git log --no-merges::
Documentation/git-rev-list.txt +5 -1
@@ -87,7 +87,7 @@ Using these options, gitlink:git-rev-list[1] will act similar to the more specialized family of commit log tools: gitlink:git-log[1], gitlink:git-show[1], and gitlink:git-whatchanged[1] -include::pretty-formats.txt[] +include::pretty-options.txt[] --relative-date::
@@ -367,6 +367,10 @@ These options are mostly targeted for packing of git repositories. Only useful with '--objects'; print the object IDs that are not in packs. + +include::pretty-formats.txt[] + + Author ------ Written by Linus Torvalds <[email protected]>
Documentation/git-show.txt +3 -0
@@ -38,6 +38,9 @@ OPTIONS For a more complete list of ways to spell object names, see "SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1]. +include::pretty-options.txt[] + + include::pretty-formats.txt[]
Documentation/pretty-formats.txt +32 -38
125 lines not on this page · raw message
Documentation/pretty-options.txt new file +14 -0
@@ -0,0 +1,14 @@ +--pretty[='<format>']:: + + Pretty print the contents of the commit logs in a given format, + where '<format>' can be one of 'oneline', 'short', 'medium', + 'full', 'fuller', 'email', 'raw' and 'format:<string>'. + When left out the format default to 'medium'. + +--encoding[=<encoding>]:: + The commit objects record the encoding used for the log message + in their encoding header; this option can be used to tell the + command to re-code the commit log message in the encoding + preferred by the user. For non plumbing commands this + defaults to UTF-8. +
Signature · 1 line
1.5.1.4
Quoted 4 lines · Jakub Narebski
Split description of pretty formats into list of pretty options (--pretty and --encoding) in new file
Documentation/pretty-options.txtand description of formats itself as a separate "PRETTY FORMATS" section in pretty-formats.txt
Very good -- thanks.
Quoted 8 lines · Junio C Hamano
Quoted 4 lines · Jakub Narebski
Split description of pretty formats into list of pretty options (--pretty and --encoding) in new file
Documentation/pretty-options.txtand description of formats itself as a separate "PRETTY FORMATS" section in pretty-formats.txtVery good -- thanks.
It should be: "section in Documentation/pretty-formats.txt". I updated one part, but forgot to update another.
Not terribly important...
Signature · 2 lines
Jakub Narebski Poland