Re: [PATCH] git-commit: add a prepare-commit-msg hook

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

 




Sure it won't break anything, but it won't work either! The existing message hook runs after the editing session -- I want the hook to introduce text that is merely a suggestion that the user can delete, or a template that the user needs to customize further.

OMG you're right. But why didn't you say so in the commit message? Something like "This hook complements the commit-msg hook, in that it runs _before_ the editor is launched".

I can't believe this. ;-)  At least I'm laughing for something nice now!

You're right, I should have said instead of this:

The prepare-commit-msg hook is run whenever a "fresh" commit message (i.e. not one taken from another commit with -c) is shown in the editor.

... just before a "fresh" commit message is shown in the editor.
         ^^^^^^

Also, the change would be non-intrusive, easy-to-review
Please.  That's ludicrous.

My patch is 3 lines of inserted code and 0 modified lines, checking one variable that is set once in builtin-commit.c (edit_message).

Actually, after reading the commit message I was in "this-is-not-necessary" mode, and therefore the diffstat looked too large for me.

Yes, but still the diffstat was all .txt files... ;-)

Actually, reading your patch again I think it also triggers for "-c", as well as for "[-C|-F|-m] ... -e".

Not for "-c", that's the point of the "edit_message" check. You're right about "-e" though.

Points taken, and patch will be resubmitted after 1.5.4.

Paolo
-
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]

  Powered by Linux