summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-05 15:41:43 -0800
committerJunio C Hamano <gitster@pobox.com>2009-03-05 15:41:43 -0800
commit458eaf5bf895c2df8e0ef81a4c9606d179082e68 (patch)
tree650130c954c3e7fc5a123106b845b9813d1ed1c3 /Documentation
parent3535dbb3d10cb2782dfbb77c07f2f7d9c44bd41f (diff)
parent72de29c24f50dccc5f045a7756bb0b47e34a7a8e (diff)
downloadgit-458eaf5bf895c2df8e0ef81a4c9606d179082e68.tar.gz
Merge branch 'ns/pretty-format'
* ns/pretty-format: bash completion: add --format= and --oneline options for "git log" Add tests for git log --pretty, --format and --oneline. Add --oneline that is a synonym to "--pretty=oneline --abbrev-commit" Give short-hands to --pretty=tformat:%formatstring Add --format that is a synonym to --pretty
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/pretty-formats.txt9
-rw-r--r--Documentation/pretty-options.txt5
2 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 159390c35a..5c6e678aa3 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -152,3 +152,12 @@ $ git log -2 --pretty=tformat:%h 4da45bef \
4da45be
7134973
---------------------
++
+In addition, any unrecognized string that has a `%` in it is interpreted
+as if it has `tformat:` in front of it. For example, these two are
+equivalent:
++
+---------------------
+$ git log -2 --pretty=tformat:%h 4da45bef
+$ git log -2 --pretty=%h 4da45bef
+---------------------
diff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt
index 5f21efe407..bff94991b6 100644
--- a/Documentation/pretty-options.txt
+++ b/Documentation/pretty-options.txt
@@ -1,4 +1,5 @@
--pretty[='<format>']::
+--format[='<format>']::
Pretty-print the contents of the commit logs in a given format,
where '<format>' can be one of 'oneline', 'short', 'medium',
@@ -17,6 +18,10 @@ configuration (see linkgit:git-config[1]).
This should make "--pretty=oneline" a whole lot more readable for
people using 80-column terminals.
+--oneline::
+ This is a shorthand for "--pretty=oneline --abbrev-commit"
+ used together.
+
--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