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

Re: Commit f5bbc322 to git broke pre-commit hooks which read stdin

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 4, 2008, 12:04 UTC
Message-ID
<alpine.LSU.1.00.0803041203320.22527@racer.site>
In-Reply-To
<0t4pbmaew9.wl%bremner@pivot.cs.unb.ca>
Hi,
On Tue, 4 Mar 2008, David Bremner wrote:
Show 16 quoted lines
> >>>>> "Junio" == Junio C Hamano <gitster@pobox.com> writes:
> 
>     Junio> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
>     >> Pardon my ignorance, but what business has metastore reading
>     >> stdin?  There should be nothing coming in, so the change you
>     >> mentioned should be correct, and your hook relies on something
>     >> it should not rely on.
> 
>     Junio> It is not metastore.  It is an interactive hook that reads
>     Junio> from the user who is sitting on the terminal and invoked
>     Junio> the git-commit program.
> 
> Yeah, I should have been more explicit. The problem is a line 
> 
>       read -N1 VAR

Can you be even more explicit? IOW why does this have to be a pre-commit hook, and cannot be done before calling git-commit itself?

Ciao, Dscho

Previous: David BremnerNext: Joey Hess
Message 7 of 14 in “Bug#469250: Commit f5bbc322 to git broke pre-commit hooks which read stdin”
  1. David BremnerMar 4, 2008
  2. Johannes SchindelinMar 4, 2008
  3. Junio C HamanoMar 4, 2008
  4. Johannes SixtMar 4, 2008
  5. Junio C HamanoMar 4, 2008
  6. David BremnerMar 4, 2008
  7. Johannes SchindelinMar 4, 2008
  8. Joey HessMar 4, 2008
  9. David BremnerMar 4, 2008
  10. Shawn O. PearceMar 5, 2008
  11. Junio C HamanoMar 5, 2008
  12. Shawn O. PearceMar 5, 2008
  13. Jakub NarebskiMar 4, 2008
  14. Johannes SchindelinMar 4, 2008

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.