Re: [PATCH] cherry-pick: add --no-verify option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 1, 2016 at 3:40 PM, Kevin Daudt <me@xxxxxxxxx> wrote:
> git commit has a --no-verify option to prevent the pre-commit hook from
> running. When continuing a conflicted cherry-pick, git commit gets
> executed which also causes the pre-commit hook to be run.
>
> Add --no-verify and pass that through to the git commit command so that
> the can prevent that from happening
>
> Signed-off-by: Kevin Daudt <me@xxxxxxxxx>
> ---
> diff --git a/t/t3510-cherry-pick-sequence.sh b/t/t3510-cherry-pick-sequence.sh
> @@ -340,6 +340,18 @@ test_expect_success '--continue after resolving conflicts and committing' '
> +test_expect_success '--continue --no-verify does not run pre-commit hook ' '
> +       pristine_detach initial &&
> +       mkdir -p .git/hooks &&
> +       echo -e "#!/bin/sh\nexit 1" >.git/hooks/pre-commit &&

Non-portable 'echo'. You could use printf instead, however, even
better would be to use write_script() along with a here-doc (then you
could drop the 'chmod' also).

> +       chmod u+x .git/hooks/pre-commit &&
> +       test_when_finished "rm -r .git/hooks/" &&
> +
> +       test_must_fail git cherry-pick picked &&
> +       git add foo &&
> +       git cherry-pick --continue --no-verify
> +'
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]