git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add --signoff and --verify option to git commit.

From
JWJosef Weidendorfer <josef.weidendorfer@gmx.de>
Date
Aug 15, 2005, 21:21 UTC
Message-ID
<200508152321.17075.Josef.Weidendorfer@gmx.de>
In-Reply-To
<7vzmrmp5kw.fsf@assigned-by-dhcp.cox.net>
On Saturday 13 August 2005 11:08, Junio C Hamano wrote:
> Also add --verify to make sure the lines you introduced are
> clean, which is more useful in commit but not very much in
> format-patch as it was originally implemented, because finding
> botches at format-patch time is too late.

I think that verification of/commenting on commits at/before commit time is a perfect place for another hook script (or collection of verification scripts).

People probably want to check a new commit on identation/coding style on a per-project manner. The hook also should be able to give warnings/hints by adding text to the commit message (e.g. "please do not use 'fgetc'" / "doublecheck quoting in system()", ...) without rejecting the commit as a whole. It could even be allowed to edit the code before commit.

These verification scripts should be used per default, and git-commit should have an option to force bypassing verification.

If I get some time, I can come up with a patch.
Josef
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 3 in “Add --signoff and --verify option to git commit.”
  1. Add --signoff and --verify option to git commit.Junio C Hamano, Aug 13, 2005
  2. Josef WeidendorferAug 15, 2005
  3. Junio C HamanoAug 16, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.