Re: [PATCH v2] diff --shortstat --dirstat: remove duplicate output

2015-03-04 Thread Jeff King
On Mon, Mar 02, 2015 at 02:00:09AM +0100, SZEDER Gábor wrote: It's not just 'grep -c' but the 'test' checking its output as well. If something goes wrong and the line count doesn't match expectations 'test' fails silently leaving the developer clueless as to what went wrong.

Re: [PATCH v2] diff --shortstat --dirstat: remove duplicate output

2015-03-01 Thread SZEDER Gábor
Hi, Quoting Mårten Kongstad marten.kongs...@gmail.com: On Sun, Mar 01, 2015 at 11:25:53AM +0100, Torsten Bögershausen wrote: On 2015-03-01 08.39, Mårten Kongstad wrote: [] +test_expect_success '--shortstat --dirstat should output only one dirstat' ' + git diff --shortstat

Re: [PATCH v2] diff --shortstat --dirstat: remove duplicate output

2015-03-01 Thread Torsten Bögershausen
On 2015-03-01 08.39, Mårten Kongstad wrote: [] index ed7e093..128f7bf 100755 --- a/t/t4047-diff-dirstat.sh +++ b/t/t4047-diff-dirstat.sh @@ -973,4 +973,15 @@ test_expect_success 'diff.dirstat=future_param,0,lines should warn, but still wo test_i18ngrep -q diff\\.dirstat actual_error

Re: [PATCH v2] diff --shortstat --dirstat: remove duplicate output

2015-03-01 Thread Michael J Gruber
Torsten Bögershausen venit, vidit, dixit 01.03.2015 11:25: On 2015-03-01 08.39, Mårten Kongstad wrote: [] index ed7e093..128f7bf 100755 --- a/t/t4047-diff-dirstat.sh +++ b/t/t4047-diff-dirstat.sh @@ -973,4 +973,15 @@ test_expect_success 'diff.dirstat=future_param,0,lines should warn, but

Re: [PATCH v2] diff --shortstat --dirstat: remove duplicate output

2015-03-01 Thread Mårten Kongstad
On Sun, Mar 01, 2015 at 11:25:53AM +0100, Torsten Bögershausen wrote: On 2015-03-01 08.39, Mårten Kongstad wrote: [] +test_expect_success '--shortstat --dirstat should output only one dirstat' ' + git diff --shortstat --dirstat=changes HEAD^..HEAD

Re: [PATCH v2] diff --shortstat --dirstat: remove duplicate output

2015-03-01 Thread Michael J Gruber
Mårten Kongstad venit, vidit, dixit 01.03.2015 17:01: On Sun, Mar 01, 2015 at 03:23:37PM +0100, Michael J Gruber wrote: [] If I would have had to guess from the documentation: What does git diff --dirstat --shortstat do? I would have answered: It displays both the dirstat and the shortstat.

Re: [PATCH v2] diff --shortstat --dirstat: remove duplicate output

2015-03-01 Thread Mårten Kongstad
On Sun, Mar 01, 2015 at 03:23:37PM +0100, Michael J Gruber wrote: [] If I would have had to guess from the documentation: What does git diff --dirstat --shortstat do? I would have answered: It displays both the dirstat and the shortstat. So, is what you are trying to fix a peculiarity of

[PATCH v2] diff --shortstat --dirstat: remove duplicate output

2015-02-28 Thread Mårten Kongstad
When --shortstat is used in conjunction with --dirstat=changes, git diff will output the dirstat information twice: first as calculated by the 'lines' algorithm, then as calculated by the 'changes' algorithm: $ git diff --dirstat=changes,10 --shortstat v2.2.0..v2.2.1 23 files changed,