author | Will Palmer <wmpalmer@gmail.com> | |
Sun, 2 May 2010 11:00:44 +0000 (12:00 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 3 May 2010 16:40:32 +0000 (09:40 -0700) | ||
commit | 8028184eecf1051e4b39b308a3ad909eed1371c4 | |
tree | 4059b0e1400306fd2b5e0d1f0ced91a65ea7061b | tree | snapshot |
parent | 2d7671ef43946cdfce140e6e9c3ca1eeea361676 | commit | diff |
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>
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>
Documentation/config.txt | diff | blob | history | |
Documentation/pretty-formats.txt | diff | blob | history | |
pretty.c | diff | blob | history | |
t/t4205-log-pretty-formats.sh | [new file with mode: 0755] | blob |