diff options
author | Prarit Bhargava <prarit@redhat.com> | 2019-10-29 15:09:14 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-30 05:49:41 +0300 |
commit | d8b8217c8a16944dc61a1553464efabc450a6680 (patch) | |
tree | abb6adff8c4f1dff6418082630369842adf00741 /t/test-lib.sh | |
parent | 45e206f0d845cfc85c39c98d0090104e72176d71 (diff) |
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/test-lib.sh')
-rw-r--r-- | t/test-lib.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index e06fa02a0e..46c4440843 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -404,9 +404,13 @@ unset VISUAL EMAIL LANGUAGE COLUMNS $("$PERL_PATH" -e ' unset XDG_CACHE_HOME unset XDG_CONFIG_HOME unset GITPERLLIB -GIT_AUTHOR_EMAIL=author@example.com +TEST_AUTHOR_LOCALNAME=author +TEST_AUTHOR_DOMAIN=example.com +GIT_AUTHOR_EMAIL=${TEST_AUTHOR_LOCALNAME}@${TEST_AUTHOR_DOMAIN} GIT_AUTHOR_NAME='A U Thor' -GIT_COMMITTER_EMAIL=committer@example.com +TEST_COMMITTER_LOCALNAME=committer +TEST_COMMITTER_DOMAIN=example.com +GIT_COMMITTER_EMAIL=${TEST_COMMITTER_LOCALNAME}@${TEST_COMMITTER_DOMAIN} GIT_COMMITTER_NAME='C O Mitter' GIT_MERGE_VERBOSITY=5 GIT_MERGE_AUTOEDIT=no |