Re: [PATCH 1/1] Add the `p4-pre-submit` hook

2018-08-01 Thread Junio C Hamano
Chen Bin writes: > The `p4-pre-submit` hook is executed before git-p4 submits code. > If the hook exits with non-zero value, submit process won't start. > > Signed-off-by: Chen Bin > --- I see that the only difference between this and what has been queued on 'pu', i.e.

[PATCH 1/1] Add the `p4-pre-submit` hook

2018-08-01 Thread Chen Bin
The `p4-pre-submit` hook is executed before git-p4 submits code. If the hook exits with non-zero value, submit process won't start. Signed-off-by: Chen Bin --- Documentation/git-p4.txt | 8 Documentation/githooks.txt | 7 +++ git-p4.py | 16 +++-

Re: [PATCH 1/1] Add the `p4-pre-submit` hook

2018-08-01 Thread Junio C Hamano
chen bin writes: > I updated the patch. But for some reason the test keep failing at this line, > `test_must_fail git p4 submit --dry-run >errs 2>&1 &&`. > > If I change this line to `test_must_fail git-p4 submit --dry-run >errs > 2>&1 &&` the test will pass. Hmph. I somehow suspect that the

Re: [PATCH 1/1] Add the `p4-pre-submit` hook

2018-08-01 Thread chen bin
I updated the patch. But for some reason the test keep failing at this line, `test_must_fail git p4 submit --dry-run >errs 2>&1 &&`. If I change this line to `test_must_fail git-p4 submit --dry-run >errs 2>&1 &&` the test will pass. Could you help me to resolve this issue? I'm really confused.

Re: [PATCH 1/1] Add the `p4-pre-submit` hook

2018-07-31 Thread Luke Diamand
On 31 July 2018 at 16:40, Junio C Hamano wrote: > Luke Diamand writes: > >> I think there is an error in the test harness. >> >> On 31 July 2018 at 10:46, SZEDER Gábor wrote: + test_must_fail git-p4 submit --dry-run >errs 2>&1 &&> + ! grep "Would apply" err >>

Re: [PATCH 1/1] Add the `p4-pre-submit` hook

2018-07-31 Thread Junio C Hamano
Luke Diamand writes: > I think there is an error in the test harness. > > On 31 July 2018 at 10:46, SZEDER Gábor wrote: >>> + test_must_fail git-p4 submit --dry-run >errs 2>&1 &&> >>> + ! grep "Would apply" err > > It writes to the file "errs" but then looks for the

Re: [PATCH 1/1] Add the `p4-pre-submit` hook

2018-07-31 Thread Luke Diamand
I think there is an error in the test harness. On 31 July 2018 at 10:46, SZEDER Gábor wrote: >> + test_must_fail git-p4 submit --dry-run >errs 2>&1 &&> >> + ! grep "Would apply" err It writes to the file "errs" but then looks for the message in "err". Luke

Re: [PATCH 1/1] Add the `p4-pre-submit` hook

2018-07-31 Thread SZEDER Gábor
> diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh > index 4849edc4e..2b7baa95d 100755 > --- a/t/t9800-git-p4-basic.sh > +++ b/t/t9800-git-p4-basic.sh > @@ -261,6 +261,35 @@ test_expect_success 'unresolvable host in P4PORT should > display error' ' > ) > ' > > +# Test

Re: [PATCH 1/1] Add the `p4-pre-submit` hook

2018-07-30 Thread Junio C Hamano
Luke Diamand writes: > Possibly it should say "it takes no parameters" rather than "it takes > no parameter"; it is confusing that in English, zero takes the plural > rather than the singular. There's a PhD in linguistics there for > someone! I count three instances. Will squash in the

Re: [PATCH 1/1] Add the `p4-pre-submit` hook

2018-07-30 Thread Luke Diamand
On 30 July 2018 at 20:07, Junio C Hamano wrote: > Chen Bin writes: > >> The `p4-pre-submit` hook is executed before git-p4 submits code. >> If the hook exits with non-zero value, submit process not start. >> >> Signed-off-by: Chen Bin >> --- > > Luke, does this version look good to you? > Yes,

Re: [PATCH 1/1] Add the `p4-pre-submit` hook

2018-07-30 Thread Junio C Hamano
Chen Bin writes: > The `p4-pre-submit` hook is executed before git-p4 submits code. > If the hook exits with non-zero value, submit process not start. > > Signed-off-by: Chen Bin > --- Luke, does this version look good to you? I still think the addition to self.description is a bit too much

Re: [PATCH 1/1] Add the `p4-pre-submit` hook

2018-07-27 Thread Eric Sunshine
On Fri, Jul 27, 2018 at 7:22 AM Chen Bin wrote: > The `p4-pre-submit` hook is executed before git-p4 submits code. > If the hook exits with non-zero value, submit process not start. > > Signed-off-by: Chen Bin > --- > diff --git a/git-p4.py b/git-p4.py > @@ -1494,7 +1494,13 @@ def

[PATCH 1/1] Add the `p4-pre-submit` hook

2018-07-27 Thread Chen Bin
The `p4-pre-submit` hook is executed before git-p4 submits code. If the hook exits with non-zero value, submit process not start. Signed-off-by: Chen Bin --- Documentation/git-p4.txt | 8 Documentation/githooks.txt | 7 +++ git-p4.py | 16 +++-