From: "Grégoire PARIS" <postmaster@greg0ire.fr>
To: Kevin Daudt <me@ikke.info>
Cc: git@vger.kernel.org
Subject: Re: Bypassing hooks while cherry-picking
Date: Thu, 3 Mar 2016 23:18:29 +0100 [thread overview]
Message-ID: <56D8B835.5040407@greg0ire.fr> (raw)
In-Reply-To: <20160303211738.GA26609@ikke.info>
Oh great, glad to see that, good job!
greg0ire
Le 03/03/2016 22:17, Kevin Daudt a écrit :
> On Tue, Mar 01, 2016 at 12:01:53PM +0100, greg0ire wrote:
>> Hello,
>>
>> using git 2.1.4 here, and it seems there is no option to bypass pre-commit
>> hooks while cherry-picking, while git commit provides a --no-verify option.
>> I ended up doing this to disable hooks while cherry picking :
>>
>> test -f "$GIT_DIR"/CHERRY_PICK_HEAD && exit 0
>>
>> Wouldn't it be best to add the --no-verify option to cherry-pick too?
>> I had a conflict when cherry-picking the commit, maybe this does not happen
>> otherwise?
>>
>> Steps to reproduce :
>>
>> 1. create a pre-commit hook
>> 2. create a commit that fails the hook, and bypass the hook
>> 3. checkout another branch
>> 4. might be optional : create a conflicting change with the previously
>> created commit
>> 5. cherry-pick the commit
>> 6. might be optional : solve the conflick and use git cherry-pick --continue
>>
>> Regards,
>>
>> --
>> greg0ire
> Forgot to CC you, but I've submitted a patch[0] that adds this option.
> The conflict does matter because otherwise the pre-commit hook does not
> run.
>
> Because they're now the rc-cycle, it might take a while before the patch
> is accepted.
>
>
> [0]:http://article.gmane.org/gmane.comp.version-control.git/288124
>
next prev parent reply other threads:[~2016-03-03 22:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 11:01 Bypassing hooks while cherry-picking greg0ire
2016-03-01 20:40 ` [PATCH] cherry-pick: add --no-verify option Kevin Daudt
2016-03-02 0:33 ` Eric Sunshine
2016-03-02 11:58 ` [PATCH v2] " Kevin Daudt
2016-03-03 21:17 ` Bypassing hooks while cherry-picking Kevin Daudt
2016-03-03 22:18 ` Grégoire PARIS [this message]
2016-03-03 21:30 ` Junio C Hamano
2016-03-03 22:20 ` Grégoire PARIS
2016-03-03 22:55 ` Junio C Hamano
2016-03-03 23:18 ` Grégoire PARIS
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56D8B835.5040407@greg0ire.fr \
--to=postmaster@greg0ire.fr \
--cc=git@vger.kernel.org \
--cc=me@ikke.info \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.