Re: [PATCH v6 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-19 Thread Jonathan Nieder
Ben Peart wrote: > Some stats on these same coding style errors in the current bash scripts: > > 298 instances of "[a-z]\(\).*\{" ie "function_name() {" (no space) > 140 instances of "if \[ .* \]" (not using the preferred "test") > 293 instances of "if .*; then" > > Wouldn't it be great not to

Re: [PATCH v6 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-19 Thread Ben Peart
amp;& git add dir2/new && + git add dir3/new && git status >actual && git -c core.fsmonitor= status >expect && test_i18ncmp expect actua

RE: [PATCH v6 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-19 Thread David Turner
il.com; christian.cou...@gmail.com; git@vger.kernel.org; > gits...@pobox.com; johannes.schinde...@gmx.de; pclo...@gmail.com; > p...@peff.net > Subject: RE: [PATCH v6 10/12] fsmonitor: add test cases for fsmonitor > extension > > > -Original Message- > > +dirty_r

Re: [PATCH v6 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-18 Thread Ben Peart
On 9/17/2017 12:47 AM, Junio C Hamano wrote: Ben Peart writes: +write_integration_script() { + write_script .git/hooks/fsmonitor-test<<-\EOF + if [ "$#" -ne 2 ]; then + echo "$0: exactly 2 arguments expected" + exit 2 +

Re: [PATCH v6 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-18 Thread Ben Peart
On 9/16/2017 11:27 AM, Torsten Bögershausen wrote: On 2017-09-15 21:20, Ben Peart wrote: +if [ "$1" != 1 ] +then + echo -e "Unsupported core.fsmonitor hook version.\n" >&2 + exit 1 +fi The echo -e not portable (It was detected by a tighter version of the lint script, which I

Re: [PATCH v6 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-16 Thread Junio C Hamano
Ben Peart writes: > +write_integration_script() { > + write_script .git/hooks/fsmonitor-test<<-\EOF > + if [ "$#" -ne 2 ]; then > + echo "$0: exactly 2 arguments expected" > + exit 2 > + fi > + if [ "$1" != 1 ]; then > +

Re: [PATCH v6 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-16 Thread Torsten Bögershausen
On 2017-09-15 21:20, Ben Peart wrote: > +if [ "$1" != 1 ] > +then > + echo -e "Unsupported core.fsmonitor hook version.\n" >&2 > + exit 1 > +fi The echo -e not portable (It was detected by a tighter version of the lint script, which I have here, but not yet send to the list :-( This

RE: [PATCH v6 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-15 Thread David Turner
> -Original Message- > +dirty_repo () { > + : >untracked && > + : >dir1/untracked && > + : >dir2/untracked && > + echo 1 >modified && > + echo 2 >dir1/modified && > + echo 3 >dir2/modified && > + echo 4 >new && > + echo 5 >dir1/new && > + echo 6

[PATCH v6 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-15 Thread Ben Peart
Test the ability to add/remove the fsmonitor index extension via update-index. Test that dirty files returned from the integration script are properly represented in the index extension and verify that ls-files correctly reports their state. Test that ensure status results are correct when using