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

Re: [PATCH 4/4] Add tests for pre-commit and commit-msg hooks

From
Wincent Colaiuta <win@wincent.com>
Date
Dec 8, 2007, 12:51 UTC
Message-ID
<6C67E7B0-EE28-450C-A33F-35D3F742F495@wincent.com>
In-Reply-To
<1197116987-21802-1-git-send-email-win@wincent.com>
El 8/12/2007, a las 13:29, Wincent Colaiuta escribió:
> As desired, these pass for git-commit.sh, fail for builtin-commit  
> (prior
> to the fixes), and succeeded for builtin-commit (after the fixes).
Actually, that's a slight lie.

The commit-msg tests 9 and 10 (editing the commit message from the hook) fail for git-commit.sh (tested 1.5.3.4 and 1.5.3.7).

By the looks of it, this discrepancy isn't actually a bug in git- commit.sh, but is because of stuff that was in commit.c back in 1.5.3.7 and prior which causes a commit message like "foo" to yield "foo<unknown>" when you do a "git log --pretty=format:%s%b -1"; post 1.5.3.7 (on master) it instead yields "foo", which is what I was testing for.

Cheers, Wincent

Previous: Wincent Colaiuta
Message 8 of 8 in “builtin-commit fixes”
  1. 0/3 builtin-commit fixesWincent Colaiuta, Dec 8, 2007
  2. 1/3 Allow --no-verify to bypass commit-msg hookWincent Colaiuta, Dec 8, 2007
  3. 2/3 Documentation: fix --no-verify documentation for "git commit"Wincent Colaiuta, Dec 8, 2007
  4. 3/3 Fix commit-msg hook to allow editingWincent Colaiuta, Dec 8, 2007
  5. Junio C HamanoDec 9, 2007
  6. Wincent ColaiutaDec 9, 2007
  7. 4/4 Add tests for pre-commit and commit-msg hooksWincent Colaiuta, Dec 8, 2007
  8. Wincent ColaiutaDec 8, 2007

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.