diff options
author | Prarit Bhargava <prarit@redhat.com> | 2019-10-29 08:09:14 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-30 11:49:41 +0900 |
commit | d8b8217c8a16944dc61a1553464efabc450a6680 (patch) | |
tree | abb6adff8c4f1dff6418082630369842adf00741 /t/t6006-rev-list-format.sh | |
parent | 45e206f0d845cfc85c39c98d0090104e72176d71 (diff) | |
download | git-d8b8217c8a16944dc61a1553464efabc450a6680.tar.gz |
pretty: add "%aL" etc. to show local-part of email addresses
In many projects the number of contributors is low enough that users know
each other and the full email address doesn't need to be displayed.
Displaying only the author's username saves a lot of columns on the screen.
Existing 'e/E' (as in "%ae" and "%aE") placeholders would show the
author's address as "prarit@redhat.com", which would waste columns to show
the same domain-part for all contributors when used in a project internal
to redhat. Introduce 'l/L' placeholders that strip '@' and domain part from
the e-mail address.
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6006-rev-list-format.sh')
-rwxr-xr-x | t/t6006-rev-list-format.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh index 1f7d3f7acc..ebdc49c496 100755 --- a/t/t6006-rev-list-format.sh +++ b/t/t6006-rev-list-format.sh @@ -109,31 +109,35 @@ commit $head1 EOF # we don't test relative here -test_format author %an%n%ae%n%ad%n%aD%n%at <<EOF +test_format author %an%n%ae%n%al%n%ad%n%aD%n%at <<EOF commit $head2 $GIT_AUTHOR_NAME $GIT_AUTHOR_EMAIL +$TEST_AUTHOR_LOCALNAME Thu Apr 7 15:13:13 2005 -0700 Thu, 7 Apr 2005 15:13:13 -0700 1112911993 commit $head1 $GIT_AUTHOR_NAME $GIT_AUTHOR_EMAIL +$TEST_AUTHOR_LOCALNAME Thu Apr 7 15:13:13 2005 -0700 Thu, 7 Apr 2005 15:13:13 -0700 1112911993 EOF -test_format committer %cn%n%ce%n%cd%n%cD%n%ct <<EOF +test_format committer %cn%n%ce%n%cl%n%cd%n%cD%n%ct <<EOF commit $head2 $GIT_COMMITTER_NAME $GIT_COMMITTER_EMAIL +$TEST_COMMITTER_LOCALNAME Thu Apr 7 15:13:13 2005 -0700 Thu, 7 Apr 2005 15:13:13 -0700 1112911993 commit $head1 $GIT_COMMITTER_NAME $GIT_COMMITTER_EMAIL +$TEST_COMMITTER_LOCALNAME Thu Apr 7 15:13:13 2005 -0700 Thu, 7 Apr 2005 15:13:13 -0700 1112911993 |