Skip to content

Commit 587089c

Browse files
committed
t9001: write $HOME/, not ~/, to help shells without tilde expansion
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 <[email protected]>
1 parent 3169e06 commit 587089c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t9001-send-email.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ test_expect_success $PREREQ 'sendemail.aliasfiletype=mailrc' '
15371537

15381538
test_expect_success $PREREQ 'sendemail.aliasfile=~/.mailrc' '
15391539
clean_fake_sendmail &&
1540-
echo "alias sbd [email protected]" >~/.mailrc &&
1540+
echo "alias sbd [email protected]" >"$HOME/.mailrc" &&
15411541
git config --replace-all sendemail.aliasesfile "~/.mailrc" &&
15421542
git config sendemail.aliasfiletype mailrc &&
15431543
git send-email \

0 commit comments

Comments
 (0)