diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-16 09:15:53 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-03-30 11:25:35 -0700 |
commit | 7cc13c717b52d3539e76f087d747f96d0d24a914 (patch) | |
tree | 1553f952b73abe8b904f6991e8f16eb8c34ba8dd /Documentation/pretty-options.txt | |
parent | 594730e980521310d88006d91f3f14ef5eff1e2b (diff) | |
download | git-7cc13c717b52d3539e76f087d747f96d0d24a914.tar.gz |
pretty: expand tabs in indented logs to make things line up properly
A commit log message sometimes tries to line things up using tabs,
assuming fixed-width font with the standard 8-place tab settings.
Viewing such a commit however does not work well in "git log", as
we indent the lines by prefixing 4 spaces in front of them.
This should all line up:
Column 1 Column 2
-------- --------
A B
ABCD EFGH
SPACES Instead of Tabs
Even with multi-byte UTF8 characters:
Column 1 Column 2
-------- --------
Ä B
åäö 100
A Møøse once bit my sister..
Tab-expand the lines in "git log --expand-tabs" output before
prefixing 4 spaces.
This is based on the patch by Linus Torvalds, but at this step, we
require an explicit command line option to enable the behaviour.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/pretty-options.txt')
-rw-r--r-- | Documentation/pretty-options.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt index 4b659ac1a6..d820653784 100644 --- a/Documentation/pretty-options.txt +++ b/Documentation/pretty-options.txt @@ -42,6 +42,11 @@ people using 80-column terminals. verbatim; this means that invalid sequences in the original commit may be copied to the output. +--expand-tabs:: + Perform a tab expansion (replace each tab with enough spaces + to fill to the next display column that is multiple of 8) + in the log message before showing it in the output. + ifndef::git-rev-list[] --notes[=<ref>]:: Show the notes (see linkgit:git-notes[1]) that annotate the |