From: Junio C Hamano <gitster@pobox.com>
To: "Mårten Kongstad" <marten.kongstad@gmail.com>
Cc: git@vger.kernel.org, szeder@ira.uka.de, tboegi@web.de, johan@herland.net
Subject: Re: [PATCH v3] diff --shortstat --dirstat: remove duplicate output
Date: Thu, 05 Mar 2015 13:38:21 -0800 [thread overview]
Message-ID: <xmqq8ufb2khe.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: 1425308739-13082-1-git-send-email-marten.kongstad@gmail.com
Mårten Kongstad <marten.kongstad@gmail.com> writes:
> v3: change how tests count (part of) the dirstat number of lines: instead of
> 'grep -c', use 'grep >filename && test_line_count'. Thanks to Torsten
> Bögershausen and SZEDER Gábor for pointing out how to improve the tests.
Thanks.
I'd squash the following on top before queuing it.
The overlong lines that ignores the exit status from "git diff"
looked problematic to me.
t/t4047-diff-dirstat.sh | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/t/t4047-diff-dirstat.sh b/t/t4047-diff-dirstat.sh
index 065d74f..0d50dce 100755
--- a/t/t4047-diff-dirstat.sh
+++ b/t/t4047-diff-dirstat.sh
@@ -974,13 +974,16 @@ test_expect_success 'diff.dirstat=future_param,0,lines should warn, but still wo
'
test_expect_success '--shortstat --dirstat should output only one dirstat' '
- git diff --shortstat --dirstat=changes HEAD^..HEAD | grep " dst/copy/changed/$" >actual_diff_shortstat_dirstat_changes &&
+ git diff --shortstat --dirstat=changes HEAD^..HEAD >out &&
+ grep " dst/copy/changed/$" out >actual_diff_shortstat_dirstat_changes &&
test_line_count = 1 actual_diff_shortstat_dirstat_changes &&
- git diff --shortstat --dirstat=lines HEAD^..HEAD | grep " dst/copy/changed/$" >actual_diff_shortstat_dirstat_lines &&
+ git diff --shortstat --dirstat=lines HEAD^..HEAD >out &&
+ grep " dst/copy/changed/$" out >actual_diff_shortstat_dirstat_lines &&
test_line_count = 1 actual_diff_shortstat_dirstat_lines &&
- git diff --shortstat --dirstat=files HEAD^..HEAD | grep " dst/copy/changed/$" >actual_diff_shortstat_dirstat_files &&
+ git diff --shortstat --dirstat=files HEAD^..HEAD >out &&
+ grep " dst/copy/changed/$" out >actual_diff_shortstat_dirstat_files &&
test_line_count = 1 actual_diff_shortstat_dirstat_files
'
next prev parent reply other threads:[~2015-03-05 21:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-28 13:19 [PATCH] diff --shortstat --dirstat: remove duplicate output Mårten Kongstad
2015-02-28 14:21 ` Johan Herland
2015-03-01 3:54 ` Junio C Hamano
2015-03-01 7:39 ` [PATCH v2] " Mårten Kongstad
2015-03-01 10:25 ` Torsten Bögershausen
2015-03-01 14:23 ` Michael J Gruber
2015-03-01 16:01 ` Mårten Kongstad
2015-03-01 16:08 ` Michael J Gruber
2015-03-01 15:58 ` Mårten Kongstad
2015-03-02 1:00 ` SZEDER Gábor
2015-03-02 15:05 ` [PATCH v3] " Mårten Kongstad
2015-03-05 21:38 ` Junio C Hamano [this message]
2015-03-04 9:07 ` [PATCH v2] " Jeff King
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=xmqq8ufb2khe.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=johan@herland.net \
--cc=marten.kongstad@gmail.com \
--cc=szeder@ira.uka.de \
--cc=tboegi@web.de \
/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.