]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'lt/pretty-expand-tabs'
authorJunio C Hamano <gitster@pobox.com>
Wed, 13 Apr 2016 21:12:36 +0000 (14:12 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Apr 2016 21:12:36 +0000 (14:12 -0700)
When "git log" shows the log message indented by 4-spaces, the
remainder of a line after a HT does not align in the way the author
originally intended.  The command now expands tabs by default in
such a case, and allows the users to override it with a new option,
'--no-expand-tabs'.

* lt/pretty-expand-tabs:
  pretty: test --expand-tabs
  pretty: allow tweaking tabwidth in --expand-tabs
  pretty: enable --expand-tabs by default for selected pretty formats
  pretty: expand tabs in indented logs to make things line up properly

1  2 
Documentation/pretty-options.txt
builtin/log.c
revision.c
revision.h
t/t4201-shortlog.sh

index 54b88b6dcaaa5df06fc8dad2e5f5172682269bc9,93ad1cdc404a812228e78b85c225e6354359ac7f..6c67182728c08309c6b6281c59d67264e0c69c49
@@@ -42,8 -42,22 +42,22 @@@ people using 80-column terminals
        verbatim; this means that invalid sequences in the original
        commit may be copied to the output.
  
+ --expand-tabs=<n>::
+ --expand-tabs::
+ --no-expand-tabs::
+       Perform a tab expansion (replace each tab with enough spaces
+       to fill to the next display column that is multiple of '<n>')
+       in the log message before showing it in the output.
+       `--expand-tabs` is a short-hand for `--expand-tabs=8`, and
+       `--no-expand-tabs` is a short-hand for `--expand-tabs=0`,
+       which disables tab expansion.
+ +
+ By default, tabs are expanded in pretty formats that indent the log
+ message by 4 spaces (i.e.  'medium', which is the default, 'full',
+ and 'fuller').
  ifndef::git-rev-list[]
 ---notes[=<ref>]::
 +--notes[=<treeish>]::
        Show the notes (see linkgit:git-notes[1]) that annotate the
        commit, when showing the commit log message.  This is the default
        for `git log`, `git show` and `git whatchanged` commands when
diff --cc builtin/log.c
Simple merge
diff --cc revision.c
Simple merge
diff --cc revision.h
Simple merge
Simple merge