From: Jonathan Nieder <jrnieder@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] tests: fix syntax error in "Use advise() for hints" test
Date: Wed, 18 Aug 2010 23:30:36 -0500 [thread overview]
Message-ID: <20100819043036.GD25649@burratino> (raw)
In-Reply-To: <1282142204-14720-1-git-send-email-avarab@gmail.com>
Ævar Arnfjörð Bjarmason wrote:
> Change the test introduced in the "Use advise() for hints" patch by
> Jonathan Nieder not to use '' for quotes inside '' delimited code.
Yikes. Thanks for catching this.
> -test_expect_success 'advice from failed cherry-pick' '
> +test_expect_success 'advice from failed cherry-pick' "
[...]
> cat <<-EOF >expected &&
> - error: could not apply $picked... picked
> + error: could not apply \$picked... picked
Although the style you chose is arguably the least ugly, nested shell
interpolation can be hard to follow. How about this?
-- 8< --
Subject: t3507 (cherry-pick): escape quotes in "Use advise()" test
Do not use unescaped '' quotes inside ''-delimited code. Otherwise,
this test tries to read a file named "paths" in the test repository,
resulting in the error:
t3507-cherry-pick-conflict.sh: 59: cannot open paths: No such file
Based-on-patch-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
t/t3507-cherry-pick-conflict.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh
index 3f29594..6026e7e 100755
--- a/t/t3507-cherry-pick-conflict.sh
+++ b/t/t3507-cherry-pick-conflict.sh
@@ -50,8 +50,8 @@ test_expect_success 'advice from failed cherry-pick' '
cat <<-EOF >expected &&
error: could not apply $picked... picked
hint: after resolving the conflicts, mark the corrected paths
- hint: with 'git add <paths>' or 'git rm <paths>'
- hint: and commit the result with 'git commit -c $picked'
+ hint: with '\''git add <paths>'\'' or '\''git rm <paths>'\''
+ hint: and commit the result with '\''git commit -c $picked'\''
EOF
test_must_fail git cherry-pick picked 2>actual &&
--
1.7.2.1.544.ga752d.dirty
next prev parent reply other threads:[~2010-08-19 4:32 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-25 0:54 [RFC/PATCH 0/9] commit: more focused advice in the no-changes-staged case Jonathan Nieder
2010-07-25 0:56 ` [PATCH 1/9] wt-status: split wt_status_print into digestible pieces Jonathan Nieder
2010-07-25 0:57 ` [PATCH 2/9] wt-status: split off a function for printing submodule summary Jonathan Nieder
2010-07-25 0:58 ` [PATCH 3/9] commit: split off a function to fetch the default log message Jonathan Nieder
2010-07-25 0:58 ` [PATCH 4/9] commit: split commit -s handling into its own function Jonathan Nieder
2010-07-25 0:59 ` [PATCH 5/9] commit: split off the piece that writes status Jonathan Nieder
2010-07-25 0:59 ` [PATCH 6/9] t7508 (status): modernize style Jonathan Nieder
2010-07-25 8:38 ` Ævar Arnfjörð Bjarmason
2010-07-25 1:00 ` [PATCH 7/9] commit: give empty-commit avoidance code its own function Jonathan Nieder
2010-07-25 1:01 ` [PATCH 8/9] commit --dry-run: give advice on empty amend Jonathan Nieder
2010-07-25 1:02 ` [PATCH 9/9] commit: suppress status summary when no changes staged Jonathan Nieder
2010-08-11 7:11 ` Thomas Rast
2010-08-11 7:30 ` Jonathan Nieder
2010-08-11 7:49 ` [PATCH v2] t6040 (branch tracking): check “status” instead of “commit” Jonathan Nieder
2010-08-12 0:45 ` Ævar Arnfjörð Bjarmason
2010-08-11 12:15 ` [PATCH 9/9] commit: suppress status summary when no changes staged Ævar Arnfjörð Bjarmason
2010-08-11 23:57 ` Jonathan Nieder
2010-08-12 0:05 ` Ævar Arnfjörð Bjarmason
2010-08-12 0:10 ` Jonathan Nieder
2010-07-25 8:54 ` [RFC/PATCH 0/9] commit: more focused advice in the no-changes-staged case Ævar Arnfjörð Bjarmason
2010-07-25 9:22 ` Thomas Rast
2010-07-29 23:51 ` Making error messages stand out (Re: [RFC/PATCH 0/9] commit: more focused advice in the no-changes-staged case) Jonathan Nieder
2010-07-30 18:44 ` Sverre Rabbelier
2010-08-11 8:31 ` [WIP/PATCH 0/4] Re: Making error messages stand out Jonathan Nieder
2010-08-11 8:36 ` [PATCH 1/4] Eliminate “Finished cherry-pick/revert” message Jonathan Nieder
2010-08-11 8:36 ` [PATCH 2/4] Introduce advise() to print hints Jonathan Nieder
2010-08-11 8:37 ` [PATCH 3/4] cherry-pick/revert: Use error() for failure message Jonathan Nieder
2010-08-11 8:37 ` [PATCH 4/4] cherry-pick/revert: Use advise() for hints Jonathan Nieder
2010-08-11 9:21 ` [WIP/PATCH 0/4] Re: Making error messages stand out Nguyen Thai Ngoc Duy
2010-08-11 9:39 ` Matthieu Moy
2010-08-11 9:58 ` Nguyen Thai Ngoc Duy
2010-08-11 17:34 ` Sverre Rabbelier
2010-08-18 14:36 ` [PATCH] tests: fix syntax error in "Use advise() for hints" test Ævar Arnfjörð Bjarmason
2010-08-19 4:30 ` Jonathan Nieder [this message]
2010-08-19 12:22 ` Ævar Arnfjörð Bjarmason
2010-08-20 10:13 ` Raja R Harinath
2010-08-20 14:22 ` Ævar Arnfjörð Bjarmason
2010-08-20 17:51 ` Junio C Hamano
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=20100819043036.GD25649@burratino \
--to=jrnieder@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.