All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Allen Hubbe <allenbh@gmail.com>
Cc: git@vger.kernel.org, Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v5 1/1] send-email: Add sendmail email aliases format
Date: Mon, 25 May 2015 14:12:55 -0700	[thread overview]
Message-ID: <xmqq1ti4bbu0.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <xmqqpp5obotk.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Mon, 25 May 2015 09:32:23 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Allen Hubbe <allenbh@gmail.com> writes:
>
>> Looking closer at this and the other test cases, they are inconsistent
>> about using ".mailrc", "~/.mailrc", and "$(pwd)/.mailrc".  This would
>> add another one, "$HOME/.mailrc".
>
> In t9001, I see two tests on mailrc:
> ...
> So I do not see any reason to change most of these; except that the
> target of 'echo' should be changed from ~/.mailrc to $HOME/.mailrc.

FYI, I have tentatively queued this on top of your patch.  Please
see "git log master..cf954075" to double check.

Thanks.

-- >8 --

Subject: [PATCH] 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".

The sendmail one refers to the file from the configuration with full
path, so it does not need to know that $HOME during the test run is
set to the current "trash" directory.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 t/t9001-send-email.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index b04d263..c5c6867 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -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 \
@@ -1552,7 +1552,7 @@ test_expect_success $PREREQ 'sendemail.aliasfile=~/.mailrc' '
 test_expect_success $PREREQ 'sendemail.aliasfiletype=sendmail' '
 	clean_fake_sendmail && rm -fr outdir &&
 	git format-patch -1 -o outdir &&
-	cat >>~/.tmp-email-aliases <<-\EOF &&
+	cat >>./.tmp-email-aliases" <<-\EOF &&
 	alice: Alice W Land <awol@example.com>
 	bob: Robert Bobbyton <bob@example.com>
 	# this is a comment
-- 
2.4.1-455-ga49e496

  reply	other threads:[~2015-05-25 21:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-23 13:21 [PATCH v5 1/1] send-email: Add sendmail email aliases format Allen Hubbe
2015-05-23 17:45 ` Junio C Hamano
2015-05-23 18:00   ` Junio C Hamano
2015-05-23 23:01     ` Allen Hubbe
2015-05-23 18:07   ` Junio C Hamano
2015-05-23 22:24     ` Allen Hubbe
2015-05-25 12:47       ` Allen Hubbe
2015-05-25 16:32         ` Junio C Hamano
2015-05-25 21:12           ` Junio C Hamano [this message]
2015-05-25 21:35             ` Junio C Hamano
2015-05-26  1:51               ` Allen Hubbe
2015-05-26  1:58                 ` Junio C Hamano
2015-05-26  2:16                   ` Allen Hubbe
2015-05-26  2:55                     ` Junio C Hamano
2015-05-26  3:34                       ` Junio C Hamano
2015-05-26 18:47   ` Eric Sunshine
2015-05-26 19:10 ` Eric Sunshine
2015-05-26 19:41   ` Allen Hubbe
2015-05-26 20:53     ` Eric Sunshine
2015-05-26 21:04       ` Allen Hubbe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq1ti4bbu0.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=allenbh@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.