{"thread":{"id":"43721","subject":"[PATCH] Move --pretty options into Documentation/pretty-formats.txt","startedAt":"2006-11-18T06:24:15Z","lastAt":"2006-11-18T19:39:43Z","messageCount":2,"participants":["Chris Riddoch","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"297341","messageId":"11638310552964-git-send-email-chris@syntacticsugar.org","threadId":"43721","inReplyTo":null,"subject":"[PATCH] Move --pretty options into Documentation/pretty-formats.txt","fromName":"Chris Riddoch","fromEmail":"chris@syntacticsugar.org","sentAt":"2006-11-18T06:24:15Z","receivedAt":"2006-11-18T06:24:15Z","isPatch":true,"sender":{"key":"chris@syntacticsugar.org","avatar":null},"body":"Asciidoc-include it into the manuals for programs that use the\n--pretty command-line option, for consistency among the docs.\n\nThis describes all the pretty-formats currently listed in the cmit_fmt\nenum in commit.h, and also briefly describes the presence and format\nof the 'Merge: ' line in some pretty formats.\n\nSigned-off-by: Chris Riddoch <chris@syntacticsugar.org>\n---\n Documentation/git-diff-tree.txt  |    7 ++---\n Documentation/git-log.txt        |    3 +-\n Documentation/git-rev-list.txt   |    6 +---\n Documentation/git-show.txt       |    5 +---\n Documentation/pretty-formats.txt |   56 ++++++++++++++++++++++++++++++++++++++\n 5 files changed, 62 insertions(+), 15 deletions(-)\n\ndiff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt\nindex f7e8ff2..add0d2f 100644\n--- a/Documentation/git-diff-tree.txt\n+++ b/Documentation/git-diff-tree.txt\n@@ -73,10 +73,9 @@ 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---pretty[=(raw|medium|short)]::\n-\tThis is used to control \"pretty printing\" format of the\n-\tcommit message.  Without \"=<style>\", it defaults to\n-\tmedium.\n+\n+include::pretty-formats.txt[]\n+\n \n --no-commit-id::\n \tgit-diff-tree outputs a line with the commit ID when\ndiff --git a/Documentation/git-log.txt b/Documentation/git-log.txt\nindex c9ffff7..3f50b70 100644\n--- a/Documentation/git-log.txt\n+++ b/Documentation/git-log.txt\n@@ -24,8 +24,7 @@ This manual page describes only the most\n \n OPTIONS\n -------\n---pretty=<format>::\n-\tControls the way the commit log is formatted.\n+include::pretty-formats.txt[]\n \n --max-count=<n>::\n \tLimits the number of commits to show.\ndiff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt\nindex 00a95e2..ec43c0b 100644\n--- a/Documentation/git-rev-list.txt\n+++ b/Documentation/git-rev-list.txt\n@@ -79,11 +79,7 @@ Using these options, gitlink:git-rev-lis\n more specialized family of commit log tools: gitlink:git-log[1],\n gitlink:git-show[1], and gitlink:git-whatchanged[1]\n \n---pretty[='<format>']::\n-\n-\tPretty print the contents of the commit logs in a given format,\n-\twhere '<format>' can be one of 'raw', 'medium', 'short', 'full',\n-\tand 'oneline'. When left out the format default to 'medium'.\n+include::pretty-formats.txt[]\n \n --relative-date::\n \ndiff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\nindex 2b4df3f..4c880a8 100644\n--- a/Documentation/git-show.txt\n+++ b/Documentation/git-show.txt\n@@ -26,10 +26,7 @@ OPTIONS\n <commitid>::\n \tID of the commit to show.\n \n---pretty=<format>::\n-\tControls the output format for the commit logs.\n-\t<format> can be one of 'raw', 'medium', 'short', 'full',\n-\tand 'oneline'.\n+include::pretty-formats.txt[]\n \n Author\n ------\ndiff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt\nnew file mode 100644\nindex 0000000..293ea0f\n--- /dev/null\n+++ b/Documentation/pretty-formats.txt\n@@ -0,0 +1,56 @@\n+--pretty[='<format>']::\n+\n+        Pretty-prints the details of a commit.  The default format is\n+        'medium'.  If the commit is a merge, and the pretty-format is\n+        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 each parent commit are printed,\n+        separated by spaces.  These sha1's are abbreviated to 8\n+        characters; use the --abbrev or --no-abbrev options to alter\n+        this behavior.\n+\t\n+        * 'oneline'\n+\n+            <sha1> <title line>\n+\n+        * 'short'\n+\n+            commit <sha1>\n+            Author: <author>\n+            <title line>\n+\n+        * 'medium'\n+\n+            commit <sha1>\n+            Author: <author>\n+            Date: <date>\n+            <full commit message>\n+\n+\t* 'full'\n+\n+            commit <sha1>\n+            Author: <author>\n+            Commit: <committer>\n+            <full commit message>\n+\n+\t* 'fuller'\n+\n+\t   commit <sha1>\n+\t   Author: <author>\n+\t   AuthorDate: <date & time>\n+\t   Commit: <committer>\n+\t   CommitDate: <date & time>\n+\t   <full commit message>\n+\n+\t* 'email'\n+\t\n+           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+\t   \t    \n+\t* 'raw'\n+\t\n+\t    The entire commit exactly as stored in the commit object\n-- \n1.4.4\n"},{"id":"298365","messageId":"7virhccznk.fsf@assigned-by-dhcp.cox.net","threadId":"43721","inReplyTo":"11638310552964-git-send-email-chris@syntacticsugar.org","subject":"Re: [PATCH] Move --pretty options into Documentation/pretty-formats.txt","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-11-18T19:39:43Z","receivedAt":"2006-11-18T19:39:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Chris Riddoch <chris@syntacticsugar.org> writes:\n\n> This describes all the pretty-formats currently listed in the cmit_fmt\n> enum in commit.h, and also briefly describes the presence and format\n> of the 'Merge: ' line in some pretty formats.\n\nThanks.  Getting much warmer.\n\n> @@ -0,0 +1,56 @@\n> +--pretty[='<format>']::\n> +\n> +        Pretty-prints the details of a commit.  The default format is\n> +        'medium'.  If the commit is a merge, and the pretty-format is\n> +        not 'oneline', 'email' or 'raw', an additional line is\n> +        inserted before the 'Author:' line.  This line begins with\n\n> +        \"Merge: \" and the sha1s of each parent commit are printed,\n> +        separated by spaces.  These sha1's are abbreviated to 8\n> +        characters; use the --abbrev or --no-abbrev options to alter\n> +        this behavior.\n\nThe default abbreviation depends on the command.  Porcelain-ish\ncommands default to abbreviate but plumbing commands tend to\nshow unabbreviated.\n\nA few other things to note.\n\n - When --parents option is in effect, you will see the list of\n   parent commits on \"commit\" line after the commit itself.\n\n - The list of parents shown on \"Merge:\" may be different from\n   the true parents when the command's revision traversal is\n   limited with paths parameters; they show simplified parents.\n   This rule also applies to the parents on the \"commit\" line\n   under --parents option.\n\n - The history simplification does not affect \"parent\" line of\n   \"--pretty=raw\" format.  You can use this to find the\n   simplified parents from \"commit\" line and the true parents\n   from \"parent\" lines with --pretty=raw.\n\nHere are some examples from git.git repository to illustrate\ndifferences between various combinations.\n\n    C=2a54323\n\n    git diff-tree -s -m --pretty=$format $C\n    git diff-tree -s -m --pretty=$format --abbrev $C\n    git diff-tree -s -m --pretty=$format --abbrev --abbrev-commit $C\n\n    git log --pretty=$format --parents -n 1 --abbrev-commit $C\n\n    git log --pretty=$format --parents -n 1 $C\n    git log --pretty=$format --parents -n 1 $C -- t/\n\n"}]}