Skip to content

Commit

Permalink
t9001: write $HOME/, not ~/, to help shells without tilde expansion
Browse files Browse the repository at this point in the history
Even though it is in POSIX, we do not have to use it, only to hurt
shells that may lack the support.

The .mailrc test tries to define an alias in .mailrc in the home
directory by shell redirection, and then tries to see ~/.mailrc in
config is tilde-expanded by Git without help from shell.  So the
creation should become $HOME/ to be portable for shells that may
lack tilde expansion but the reference should be done as "~/.mailrc".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed May 27, 2015
1 parent 3169e06 commit 587089c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/t9001-send-email.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ test_expect_success $PREREQ 'sendemail.aliasfiletype=mailrc' '

test_expect_success $PREREQ 'sendemail.aliasfile=~/.mailrc' '
clean_fake_sendmail &&
echo "alias sbd someone@example.org" >~/.mailrc &&
echo "alias sbd someone@example.org" >"$HOME/.mailrc" &&
git config --replace-all sendemail.aliasesfile "~/.mailrc" &&
git config sendemail.aliasfiletype mailrc &&
git send-email \
Expand Down

0 comments on commit 587089c

Please sign in to comment.