pretty: test --expand-tabs
commit915c96df3822f968332f6bf3642e5195b52201c9
authorJunio C Hamano <gitster@pobox.com>
Mon, 4 Apr 2016 23:09:18 +0000 (4 16:09 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 5 Apr 2016 06:31:13 +0000 (4 23:31 -0700)
treee86ca7897d7c43d8c9f08016298feb2edc7eb15f
parentfe37a9c586a65943e1bca327a1bbe1ca4a3d3023
pretty: test --expand-tabs

The test prepares a simple commit with HT on its log message lines,
and makes sure that

 - formats that should or should not expand tabs by default do or do
   not expand tabs respectively,

 - with explicit --expand-tabs=<N> and short-hands --expand-tabs
   (equivalent to --expand-tabs=8) and --no-expand-tabs (equivalent
   to --expand-tabs=0) before or after the explicit --pretty=$fmt,
   the tabs are expanded (or not expanded) accordingly.

The tests use the second line of the log message for formats other
than --pretty=short, primarily because the first line of the email
format is handled specially to add the [PATCH] prefix, etc. in a
separate codepath (--pretty=short uses the first line because there
is no other line to test).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4213-log-tabexpand.sh [new file with mode: 0755]