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

rebase -i reword runs pre-commit hook with curious results

From
NKNeal Kreitzinger <neal@rsss.com>
Date
Feb 1, 2012, 21:50 UTC
Message-ID
<jgcc3q$mvl$1@dough.gmane.org>

I'm confused on why and/or how interactive rebase runs the pre-commit hook when doing the reword command for commit (a). My pre-commit hook does keyword expansion on the worktree copy of the modified index files and then re-adds them to effect a user-date-stamp when committed. However, the user-date-stamps don't get updated when reword runs the pre-commit hook. IOW, the pre-commit hook does not get the same results as if I were doing a commandline git-commit of a modified index. I suppose reword is protecting the preservation of all the contents of commit (a) except the commit message which makes sense, but I don't understand how it goes about doing this while still attempting to somehow honor the pre-commit hook. (git 1.7.1)

v/r, neal

Next: Andrew Wong
Message 1 of 3 in “rebase -i reword runs pre-commit hook with curious results”
  1. Neal KreitzingerFeb 1, 2012
  2. Andrew WongFeb 2, 2012
  3. Neal KreitzingerFeb 2, 2012

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.