Re: [PATCH] Add support for a 'pre-push' hook

2012-11-17 Thread Aske Olsson
On Fri, Nov 16, 2012 at 9:25 PM, Matthieu Moy wrote: > Aske Olsson writes: > >> +--no-verify:: >> + This option bypasses the pre-push hook. >> + See also linkgit:githooks[5]. >> + >> -q:: >> --quiet:: >> Suppress all output, including the listing of updated refs, > > Here, and below: you seem

Re: [PATCH] Add support for a 'pre-push' hook

2012-11-17 Thread Aske Olsson
On Sat, Nov 17, 2012 at 7:39 AM, Michael Haggerty wrote: > > On 11/16/2012 09:30 PM, Junio C Hamano wrote: > > Aske Olsson writes: > > > >> If the script .git/hooks/pre-push exists and is executable it will be > >> called before a `git push` command, and when the script exits with a > >> non-zero

Re: [PATCH] Add support for a 'pre-push' hook

2012-11-16 Thread Michael Haggerty
On 11/16/2012 09:30 PM, Junio C Hamano wrote: > Aske Olsson writes: > >> If the script .git/hooks/pre-push exists and is executable it will be >> called before a `git push` command, and when the script exits with a >> non-zero status the push will be aborted. >> The hook can be overridden by pass

Re: [PATCH] Add support for a 'pre-push' hook

2012-11-16 Thread Junio C Hamano
Matthieu Moy writes: >> +# hook that fails >> +mk_hook_fail () { >> +cat > "$HOOK" <> +#!/bin/sh >> +exit 1 >> +EOF >> +chmod +x "$HOOK" >> +} > > I'd add a "touch hook-ran" in the script, a "rm -f hook-ran" before > launching git-push, and test the file existance after the hook to make > sure it

Re: [PATCH] Add support for a 'pre-push' hook

2012-11-16 Thread Junio C Hamano
Aske Olsson writes: > If the script .git/hooks/pre-push exists and is executable it will be > called before a `git push` command, and when the script exits with a > non-zero status the push will be aborted. > The hook can be overridden by passing the '--no-verify' option to > `git push`. > > The

Re: [PATCH] Add support for a 'pre-push' hook

2012-11-16 Thread Matthieu Moy
Aske Olsson writes: > If the script .git/hooks/pre-push exists and is executable it will be > called before a `git push` command, and when the script exits with a > non-zero status the push will be aborted. That sounds like a sane thing to do. > Documentation/git-push.txt | 11 +++- > Documen