diff options
author | Will Palmer <wmpalmer@gmail.com> | 2010-05-02 12:00:44 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-05-03 09:40:32 -0700 |
commit | 8028184eecf1051e4b39b308a3ad909eed1371c4 (patch) | |
tree | 4059b0e1400306fd2b5e0d1f0ced91a65ea7061b /Documentation/pretty-formats.txt | |
parent | 2d7671ef43946cdfce140e6e9c3ca1eeea361676 (diff) | |
download | git-8028184eecf1051e4b39b308a3ad909eed1371c4.tar.gz |
pretty: add aliases for pretty formats
previously the only ways to alias a --pretty format within git were
either to set the format as your default format (via the format.pretty
configuration variable), or by using a regular git alias. This left the
definition of more complicated formats to the realm of "builtin or
nothing", with user-defined formats usually being reserved for quick
one-offs.
Here we allow user-defined formats to enjoy more or less the same
benefits of builtins. By defining pretty.myalias, "myalias" can be
used in place of whatever would normally come after --pretty=. This
can be a format:, tformat:, raw (ie, defaulting to tformat), or the name
of another builtin or user-defined pretty format.
Signed-off-by: Will Palmer <wmpalmer@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/pretty-formats.txt')
-rw-r--r-- | Documentation/pretty-formats.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index 1686a54d22..5e95df6ba3 100644 --- a/Documentation/pretty-formats.txt +++ b/Documentation/pretty-formats.txt @@ -11,7 +11,12 @@ have limited your view of history: for example, if you are only interested in changes related to a certain directory or file. -Here are some additional details for each format: +There are several built-in formats, and you can define +additional formats by setting a pretty.<name> +config option to either another format name, or a +'format:' string, as described below (see +linkgit:git-config[1]). Here are the details of the +built-in formats: * 'oneline' |