Re: [PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-25 Thread Eric Sunshine
On Fri, Mar 25, 2016 at 2:15 PM, Pranit Bauva wrote: > On Fri, Mar 25, 2016 at 10:34 PM, Eric Sunshine > wrote: >> That works too, simplifying the overall implementation, and >> eliminating the need for the introductory patch which moves >>

Re: [PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-25 Thread Pranit Bauva
On Fri, Mar 25, 2016 at 10:34 PM, Eric Sunshine wrote: > That works too, simplifying the overall implementation, and > eliminating the need for the introductory patch which moves > 'test_set_editor' into each test. Wouldn't it be cleaner if the introductory patch

Re: [PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-25 Thread Eric Sunshine
On Fri, Mar 25, 2016 at 10:46 AM, SZEDER Gábor wrote: > Quoting Eric Sunshine : >> On Thu, Mar 24, 2016 at 7:00 AM, SZEDER Gábor wrote: -cat >check-for-diff <>>> -#!$SHELL_PATH -exec grep '^diff --git' "\$1"

Re: [PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-25 Thread Pranit Bauva
On Fri, Mar 25, 2016 at 8:16 PM, SZEDER Gábor wrote: > By redirecting grep's output to a file in the editor script, like this > patch wanted to, we can count the lines in the test script itself after > 'git commit' finished. This way we could use test_line_count, with > all

Re: [PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-25 Thread SZEDER Gábor
Quoting Eric Sunshine : On Thu, Mar 24, 2016 at 7:00 AM, SZEDER Gábor wrote: diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh index 2ddf28c..cf95efb 100755 --- a/t/t7507-commit-verbose.sh +++ b/t/t7507-commit-verbose.sh @@ -3,12

Re: [PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-25 Thread Pranit Bauva
On Fri, Mar 25, 2016 at 11:54 AM, Eric Sunshine wrote: > On Fri, Mar 25, 2016 at 2:06 AM, Pranit Bauva wrote: >> On Fri, Mar 25, 2016 at 5:27 AM, Eric Sunshine >> wrote: >>> Agreed that this needs proper justification in

Re: [PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-25 Thread Eric Sunshine
On Fri, Mar 25, 2016 at 2:06 AM, Pranit Bauva wrote: > On Fri, Mar 25, 2016 at 5:27 AM, Eric Sunshine > wrote: >> Agreed that this needs proper justification in the commit message. >> And, the justification is to make each test more

Re: [PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-25 Thread Pranit Bauva
On Fri, Mar 25, 2016 at 5:27 AM, Eric Sunshine wrote: > On Thu, Mar 24, 2016 at 7:00 AM, SZEDER Gábor wrote: >>> Also remove test_set_editor from global scope and use it in whichever >>> test it is required. >> >> Why? >> >> test_set_editor sets and

Re: [PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-24 Thread Eric Sunshine
On Thu, Mar 24, 2016 at 7:00 AM, SZEDER Gábor wrote: >> Also remove test_set_editor from global scope and use it in whichever >> test it is required. > > Why? > > test_set_editor sets and exports shell variables. Since you don't > invoke test_set_editor in a subshell, after

[PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-24 Thread SZEDER Gábor
> Also remove test_set_editor from global scope and use it in whichever > test it is required. Why? test_set_editor sets and exports shell variables. Since you don't invoke test_set_editor in a subshell, after the first invocation the editor will be part of the global scope anyway. Also

[PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-24 Thread Pranit Bauva
Also remove test_set_editor from global scope and use it in whichever test it is required. --- t/t7507-commit-verbose.sh | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh index 2ddf28c..cf95efb 100755 ---