From: greg0ire <postmaster@greg0ire.fr>
To: git@vger.kernel.org
Subject: Bypassing hooks while cherry-picking
Date: Tue, 1 Mar 2016 12:01:53 +0100 [thread overview]
Message-ID: <56D576A1.3020202@greg0ire.fr> (raw)
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
next reply other threads:[~2016-03-01 11:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 11:01 greg0ire [this message]
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
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=56D576A1.3020202@greg0ire.fr \
--to=postmaster@greg0ire.fr \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).