Re: [PATCH v10 2/3] t7507-commit-verbose: store output of grep in a file

2016-03-27 Thread Pranit Bauva
On Sun, Mar 27, 2016 at 10:57 PM, Eric Sunshine wrote: > On Sun, Mar 27, 2016 at 03:27:25PM +0200, SZEDER Gábor wrote: >> > > +! test -s out || >> > > +rm out && >> > >> > Why not just "rm -f out"? But, more importantly, why do you need to >> > remove the file at all? The '>' redirection operator

Re: [PATCH v10 2/3] t7507-commit-verbose: store output of grep in a file

2016-03-27 Thread Eric Sunshine
On Sun, Mar 27, 2016 at 03:27:25PM +0200, SZEDER Gábor wrote: > > > +! test -s out || > > > +rm out && > > > > Why not just "rm -f out"? But, more importantly, why do you need to > > remove the file at all? The '>' redirection operator (used below) will > > overwrite the file, so no need to remove

Re: [PATCH v10 2/3] t7507-commit-verbose: store output of grep in a file

2016-03-27 Thread Eric Sunshine
[forwarding this to the list, as well, since I again didn't notice when replying that Pranit had accidentally dropped the mailing list as a recipient] On Sun, Mar 27, 2016 at 12:59 PM, Eric Sunshine wrote: > On Sun, Mar 27, 2016 at 5:05 AM, Pranit Bauva wrote: >> On Sun, Mar 27, 2016 at 12:40 PM

Re: [PATCH v10 2/3] t7507-commit-verbose: store output of grep in a file

2016-03-27 Thread Eric Sunshine
[also forwarding this to the list since it's relevant to the ongoing discussion, and I hadn't noticed when replying that Pranit had (presumably) accidentally dropped the git list as a recipient] On Sun, Mar 27, 2016 at 3:10 AM, Eric Sunshine wrote: > On Sun, Mar 27, 2016 at 1:42 AM, Pranit Bauva

Re: [PATCH v10 2/3] t7507-commit-verbose: store output of grep in a file

2016-03-27 Thread Eric Sunshine
[forwarding this to the list since Pranit (presumably) accidentally replied only to me but it's relevant to the ongoing discussion] On Sun, Mar 27, 2016 at 1:42 AM, Pranit Bauva wrote: > On Sun, Mar 27, 2016 at 8:37 AM, Eric Sunshine > wrote: >> On Sat, Mar 26, 2016 at 3:48 PM, Pranit Bauva wr

Re: [PATCH v10 2/3] t7507-commit-verbose: store output of grep in a file

2016-03-27 Thread Pranit Bauva
On Sun, Mar 27, 2016 at 6:57 PM, SZEDER Gábor wrote: >> > +! test -s out || >> > +rm out && >> >> Why not just "rm -f out"? But, more importantly, why do you need to >> remove the file at all? The '>' redirection operator (used below) will >> overwrite the file, so no need to remove it beforehand.

Re: [PATCH v10 2/3] t7507-commit-verbose: store output of grep in a file

2016-03-27 Thread SZEDER Gábor
> > +! test -s out || > > +rm out && > > Why not just "rm -f out"? But, more importantly, why do you need to > remove the file at all? The '>' redirection operator (used below) will > overwrite the file, so no need to remove it beforehand. > > > +! grep '^diff --git' "$1" || > > +grep '^diff --gi

Re: [PATCH v10 2/3] t7507-commit-verbose: store output of grep in a file

2016-03-26 Thread Eric Sunshine
On Sat, Mar 26, 2016 at 3:48 PM, Pranit Bauva wrote: > So that we can see how many diffs were contained in the message and use > them in individual tests where ever it is required. Also use > write_script() to create the fake "editor". It is important to explain *why* you want to be able to count