threads / patch / 42927

patchcommit: Fix description of no-verify

Subject: [PATCH] commit: Fix description of no-verify

## tl;dr

4 messages between Jul 26, 2016 and Jul 26, 2016. Diffs are folded; open one to read it.

replies: 3people: 2as markdown or json

Orgad Shaneh· Jul 26, 2016, 07:48 UTC · lore
From: Orgad Shaneh <orgads@gmail.com>
include also commit-msg hook.
Signed-off-by: Orgad Shaneh <orgads@gmail.com>
---
 builtin/commit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to builtin/commit.c +1 −1
diff --git a/builtin/commit.c b/builtin/commit.c
index 163dbca..2725712 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1616,7 +1616,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
 		OPT_BOOL(0, "interactive", &interactive, N_("interactively add files")),
 		OPT_BOOL('p', "patch", &patch_interactive, N_("interactively add changes")),
 		OPT_BOOL('o', "only", &only, N_("commit only specified files")),
-		OPT_BOOL('n', "no-verify", &no_verify, N_("bypass pre-commit hook")),
+		OPT_BOOL('n', "no-verify", &no_verify, N_("bypass pre-commit and commit-msg hooks")),
 		OPT_BOOL(0, "dry-run", &dry_run, N_("show what would be committed")),
 		OPT_SET_INT(0, "short", &status_format, N_("show status concisely"),
 			    STATUS_FORMAT_SHORT),
-- 
2.8.2
Johannes Schindelin· Jul 26, 2016, 12:55 UTC · re: Orgad Shaneh · lore

Re: [PATCH] commit: Fix description of no-verify

Hi Orgad
On Tue, 26 Jul 2016, Orgad Shaneh wrote:
> From: Orgad Shaneh <orgads@gmail.com>
This is unnecessary, as it matches your email address.
> include also commit-msg hook.

This comment was a bit cryptic, until I read the patch. Now I find that comment redundant with the patch.

However, I think that...
> -		OPT_BOOL('n', "no-verify", &no_verify, N_("bypass pre-commit hook")),
> +		OPT_BOOL('n', "no-verify", &no_verify, N_("bypass pre-commit and commit-msg hooks")),

... it may be more desirable to future-proof this simply by saying "bypass hooks".

In the alternative, it would be good if the commit message could convincingly make the case that there are no other hooks that will be skipped with -n.

Of course, I could go and look at the source code to convince myself. But it is really the duty of the commit message to be already convincing enough.

Ciao, Dscho

Orgad Shaneh· Jul 26, 2016, 13:09 UTC · re: Johannes Schindelin · lore

Re: [PATCH] commit: Fix description of no-verify

Hi and thanks for your reply.

On Tue, Jul 26, 2016 at 3:55 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

Show 12 quoted lines
> Hi Orgad
>
> On Tue, 26 Jul 2016, Orgad Shaneh wrote:
>
>> From: Orgad Shaneh <orgads@gmail.com>
>
> This is unnecessary, as it matches your email address.
>
>> include also commit-msg hook.
>
> This comment was a bit cryptic, until I read the patch. Now I find that
> comment redundant with the patch.

This brings the short help in line with the documentation. I should have stated that in the commit message.

Show 9 quoted lines
>
> However, I think that...
>
>> -             OPT_BOOL('n', "no-verify", &no_verify, N_("bypass pre-commit hook")),
>> +             OPT_BOOL('n', "no-verify", &no_verify, N_("bypass pre-commit and commit-msg hooks")),
>
>
> ... it may be more desirable to future-proof this simply by saying "bypass
> hooks".
That wouldn't be correct. prepare-commit-msg is not suppressed by this flag.
Show 10 quoted lines
> In the alternative, it would be good if the commit message could
> convincingly make the case that there are no other hooks that will be
> skipped with -n.
>
> Of course, I could go and look at the source code to convince myself. But
> it is really the duty of the commit message to be already convincing
> enough.
>
> Ciao,
> Dscho

I don't have much experience with submitting patches to Git. How do I edit the commit message? Submit it as a new patch?

- Orgad
Johannes Schindelin· Jul 26, 2016, 13:43 UTC · re: Orgad Shaneh · lore

Re: [PATCH] commit: Fix description of no-verify

Hi Orgad,
On Tue, 26 Jul 2016, Orgad Shaneh wrote:
Show 12 quoted lines
> On Tue, Jul 26, 2016 at 3:55 PM, Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
> >
> > On Tue, 26 Jul 2016, Orgad Shaneh wrote:
> >
> >> include also commit-msg hook.
> >
> > This comment was a bit cryptic, until I read the patch. Now I find that
> > comment redundant with the patch.
> 
> This brings the short help in line with the documentation. I should
> have stated that in the commit message.
That would be good.
> I don't have much experience with submitting patches to Git. How do I
> edit the commit message? Submit it as a new patch?

You edit it locally via `git commit --amend` (or using rebase -i's `reword` if you need to adjust a commit message in the middle of a patch series, not at the end).

Then you send it as a reply to the first submission (--in-reply-to, if you use format-patch), with the `[PATCH v2]` prefix (--subject-prefix='[PATCH v2]' if you use format-patch).

Ciao, Dscho

← back to recent threads