{"thread":{"id":"8141","subject":"[PATCH] Documentation: Split description of pretty formats of commit log","startedAt":"2007-05-13T23:25:45Z","lastAt":"2007-05-14T07:47:17Z","messageCount":3,"participants":["Jakub Narebski","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"42067","messageId":"200705140125.45711.jnareb@gmail.com","threadId":"8141","inReplyTo":null,"subject":"[PATCH] Documentation: Split description of pretty formats of commit log","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-05-13T23:25:45Z","receivedAt":"2007-05-13T23:25:45Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Split description of pretty formats into list of pretty options\n(--pretty and --encoding) in new file Documentation/pretty-options.txt\nand description of formats itself as a separate \"PRETTY FORMATS\"\nsection in pretty-formats.txt\n\nWhile at it correct formatting a bit, to be better laid out in the\nresulting manpages: git-rev-list(1), git-show(1), git-log(1) and\ngit-diff-tree(1).  Those manpages now include pretty options in the\nsame place as it was before, and description of formats just after\nall options.\n\nInspired by the split into two filesdocumentation for merge strategies:\nDocumentation/merge-options.txt and Documentation/merge-strategies.txt\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\nI was fed up with the fact that description of pretty formats takes\nso much place for some manpages directly in the middle of other options,\nmaking manpage unnecessary hard to read. So here there are the patch\nfor this.\n\nNote: I have tested only manpage output; HTML output style might be\na bit broken, but I think it was broken before.\n\nMost of the patch Documentation/pretty-formats.txt is just\nreformatting.\n\n Documentation/git-diff-tree.txt  |    5 ++-\n Documentation/git-log.txt        |    5 ++-\n Documentation/git-rev-list.txt   |    6 +++-\n Documentation/git-show.txt       |    3 ++\n Documentation/pretty-formats.txt |   70 +++++++++++++++++--------------------\n Documentation/pretty-options.txt |   14 +++++++\n 6 files changed, 62 insertions(+), 41 deletions(-)\n create mode 100644 Documentation/pretty-options.txt\n\ndiff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt\nindex 5d6e9dc..6e660e2 100644\n--- a/Documentation/git-diff-tree.txt\n+++ b/Documentation/git-diff-tree.txt\n@@ -73,7 +73,7 @@ separated with a single space are given.\n \tThis flag causes \"git-diff-tree --stdin\" to also show\n \tthe commit message before the differences.\n \n-include::pretty-formats.txt[]\n+include::pretty-options.txt[]\n \n --no-commit-id::\n \tgit-diff-tree outputs a line with the commit ID when\n@@ -104,6 +104,9 @@ include::pretty-formats.txt[]\n \tif the diff itself is empty.\n \n \n+include::pretty-formats.txt[]\n+\n+\n Limiting Output\n ---------------\n If you're only interested in differences in a subset of files, for\ndiff --git a/Documentation/git-log.txt b/Documentation/git-log.txt\nindex dd06527..0f353f6 100644\n--- a/Documentation/git-log.txt\n+++ b/Documentation/git-log.txt\n@@ -25,7 +25,7 @@ This manual page describes only the most frequently used options.\n OPTIONS\n -------\n \n-include::pretty-formats.txt[]\n+include::pretty-options.txt[]\n \n -<n>::\n \tLimits the number of commits to show.\n@@ -58,6 +58,9 @@ include::pretty-formats.txt[]\n \tShow only commits that affect the specified paths.\n \n \n+include::pretty-formats.txt[]\n+\n+\n Examples\n --------\n git log --no-merges::\ndiff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt\nindex 1b12b4f..ab90a22 100644\n--- a/Documentation/git-rev-list.txt\n+++ b/Documentation/git-rev-list.txt\n@@ -87,7 +87,7 @@ Using these options, gitlink:git-rev-list[1] will act similar to the\n more specialized family of commit log tools: gitlink:git-log[1],\n gitlink:git-show[1], and gitlink:git-whatchanged[1]\n \n-include::pretty-formats.txt[]\n+include::pretty-options.txt[]\n \n --relative-date::\n \n@@ -367,6 +367,10 @@ These options are mostly targeted for packing of git repositories.\n \tOnly useful with '--objects'; print the object IDs that are not\n \tin packs.\n \n+\n+include::pretty-formats.txt[]\n+\n+\n Author\n ------\n Written by Linus Torvalds <torvalds@osdl.org>\ndiff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\nindex 5a219ab..34c5caf 100644\n--- a/Documentation/git-show.txt\n+++ b/Documentation/git-show.txt\n@@ -38,6 +38,9 @@ OPTIONS\n \tFor a more complete list of ways to spell object names, see\n \t\"SPECIFYING REVISIONS\" section in gitlink:git-rev-parse[1].\n \n+include::pretty-options.txt[]\n+\n+\n include::pretty-formats.txt[]\n \n \ndiff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt\nindex d7ffc21..99fbd6b 100644\n--- a/Documentation/pretty-formats.txt\n+++ b/Documentation/pretty-formats.txt\n@@ -1,31 +1,32 @@\n---pretty[='<format>']::\n-\n-        Pretty-prints the details of a commit.  `--pretty`\n-\twithout an explicit `=<format>` defaults to 'medium'.\n-\tIf the commit is a merge, and if the pretty-format\n-        is not 'oneline', 'email' or 'raw', an additional line is\n-        inserted before the 'Author:' line.  This line begins with\n-        \"Merge: \" and the sha1s of ancestral commits are printed,\n-        separated by spaces.  Note that the listed commits may not\n-        necessarily be the list of the *direct* parent commits if you\n-        have limited your view of history: for example, if you are\n-        only interested in changes related to a certain directory or\n-        file.  Here are some additional details for each format:\n-\n-        * 'oneline'\n+PRETTY FORMATS\n+--------------\n+\n+If the commit is a merge, and if the pretty-format\n+is not 'oneline', 'email' or 'raw', an additional line is\n+inserted before the 'Author:' line.  This line begins with\n+\"Merge: \" and the sha1s of ancestral commits are printed,\n+separated by spaces.  Note that the listed commits may not\n+necessarily be the list of the *direct* parent commits if you\n+have limited your view of history: for example, if you are\n+only interested in changes related to a certain directory or\n+file.\n+\n+Here are some additional details for each format:\n+\n+* 'oneline'\n \n \t  <sha1> <title line>\n-+\n-This is designed to be as compact as possible.\n \n-        * 'short'\n+\t  This is designed to be as compact as possible.\n+\n+* 'short'\n \n \t  commit <sha1>\n \t  Author: <author>\n \n \t      <title line>\n \n-        * 'medium'\n+* 'medium'\n \n \t  commit <sha1>\n \t  Author: <author>\n@@ -35,7 +36,7 @@ This is designed to be as compact as possible.\n \n \t      <full commit message>\n \n-        * 'full'\n+* 'full'\n \n \t  commit <sha1>\n \t  Author: <author>\n@@ -45,7 +46,7 @@ This is designed to be as compact as possible.\n \n \t      <full commit message>\n \n-        * 'fuller'\n+* 'fuller'\n \n \t  commit <sha1>\n \t  Author: <author>\n@@ -57,18 +58,16 @@ This is designed to be as compact as possible.\n \n \t       <full commit message>\n \n-\n-        * 'email'\n+* 'email'\n \n \t  From <sha1> <date>\n \t  From: <author>\n \t  Date: <date & time>\n \t  Subject: [PATCH] <title line>\n \n-\t  full commit message>\n-\n+\t  <full commit message>\n \n-\t* 'raw'\n+* 'raw'\n +\n The 'raw' format shows the entire commit exactly as\n stored in the commit object.  Notably, the SHA1s are\n@@ -77,19 +76,22 @@ displayed in full, regardless of whether --abbrev or\n true parent commits, without taking grafts nor history\n simplification into account.\n \n-\t* 'format:'\n+* 'format:'\n +\n The 'format:' format allows you to specify which information\n you want to show. It works a little bit like printf format,\n with the notable exception that you get a newline with '%n'\n instead of '\\n'.\n-\n-E.g, 'format:\"The author of %h was %an, %ar%nThe title was >>%s<<\"'\n++\n+E.g, 'format:\"The author of %h was %an, %ar%nThe title was >>%s<<%n\"'\n would show something like this:\n-\n++\n+-------\n The author of fe6e0ee was Junio C Hamano, 23 hours ago\n The title was >>t4119: test autocomputing -p<n> for traditional diff input.<<\n \n+--------\n++\n The placeholders are:\n \n - '%H': commit hash\n@@ -120,11 +122,3 @@ The placeholders are:\n - '%m': left, right or boundary mark\n - '%n': newline\n \n-\n---encoding[=<encoding>]::\n-\tThe commit objects record the encoding used for the log message\n-\tin their encoding header; this option can be used to tell the\n-\tcommand to re-code the commit log message in the encoding\n-\tpreferred by the user.  For non plumbing commands this\n-\tdefaults to UTF-8.\n-\ndiff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt\nnew file mode 100644\nindex 0000000..7d515be\n--- /dev/null\n+++ b/Documentation/pretty-options.txt\n@@ -0,0 +1,14 @@\n+--pretty[='<format>']::\n+\n+\tPretty print the contents of the commit logs in a given format,\n+\twhere '<format>' can be one of 'oneline', 'short', 'medium',\n+\t'full', 'fuller', 'email', 'raw' and 'format:<string>'.\n+\tWhen left out the format default to 'medium'.\n+\n+--encoding[=<encoding>]::\n+\tThe commit objects record the encoding used for the log message\n+\tin their encoding header; this option can be used to tell the\n+\tcommand to re-code the commit log message in the encoding\n+\tpreferred by the user.  For non plumbing commands this\n+\tdefaults to UTF-8.\n+\n-- \n1.5.1.4\n"},{"id":"42090","messageId":"7vejlkp440.fsf@assigned-by-dhcp.cox.net","threadId":"8141","inReplyTo":"200705140125.45711.jnareb@gmail.com","subject":"Re: [PATCH] Documentation: Split description of pretty formats of commit log","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-05-14T01:48:31Z","receivedAt":"2007-05-14T01:48:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Split description of pretty formats into list of pretty options\n> (--pretty and --encoding) in new file Documentation/pretty-options.txt\n> and description of formats itself as a separate \"PRETTY FORMATS\"\n> section in pretty-formats.txt\n\nVery good -- thanks.\n"},{"id":"42100","messageId":"200705140947.17285.jnareb@gmail.com","threadId":"8141","inReplyTo":"7vejlkp440.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Documentation: Split description of pretty formats of commit log","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-05-14T07:47:17Z","receivedAt":"2007-05-14T07:47:17Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n> Jakub Narebski <jnareb@gmail.com> writes:\n> \n>> Split description of pretty formats into list of pretty options\n>> (--pretty and --encoding) in new file Documentation/pretty-options.txt\n>> and description of formats itself as a separate \"PRETTY FORMATS\"\n>> section in pretty-formats.txt\n> \n> Very good -- thanks.\n\nIt should be: \"section in Documentation/pretty-formats.txt\". I updated\none part, but forgot to update another.\n\nNot terribly important...\n-- \nJakub Narebski\nPoland\n"}]}