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

Re: Git and Scmbug integration

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 14, 2007, 01:27 UTC
Message-ID
<7vk5olpqep.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<ee77f5c20711131716l6dd1dccjcb3ff5f3a54c9359@mail.gmail.com>
"David Symonds" <dsymonds@gmail.com> writes:
> Reading HEAD would be fine. I guess it just seems a sensible and more
> direct path to passing that information so that the hook has less to
> do. It seems quite a simple thing that would be very helpful to hook
> writers, with zero impact on everyone else.

You cannot just say "The hook did not get any parameter, nobody would have cared, this does not regress."

Some anal people could have checked and checked "test $# = 0" at the beginning to make sure their hooks do not get broken by random interface changes on the git side. Now their carefully written script errors out as designed. Also some people seem to use different version of git on the same repository (e.g. NFS mounted across hosts that run different versions of git).

I would 80% agree with you if the post-comit hook interface were written in the way your patch does from day one. Unfortunately that is not the case.

The remaining 20%? If we _were_ to change the hook interface, I would also pass which branch the commit is added to, in addition to what commit it is.

Both are easily obtainable by reading HEAD (you need to read HEAD twice, though) but would be handy.

Previous: David SymondsNext: Junio C Hamano
Message 9 of 17 in “Git and Scmbug integration”
  1. Kristis MakrisNov 13, 2007
  2. David SymondsNov 13, 2007
  3. Kristis MakrisNov 13, 2007
  4. David SymondsNov 14, 2007
  5. Kristis MakrisNov 14, 2007
  6. David SymondsNov 14, 2007
  7. Junio C HamanoNov 14, 2007
  8. David SymondsNov 14, 2007
  9. Junio C HamanoNov 14, 2007
  10. Junio C HamanoNov 14, 2007
  11. Martin LanghoffNov 14, 2007
  12. Alex RiesenNov 13, 2007
  13. David SymondsNov 13, 2007
  14. Alex RiesenNov 14, 2007
  15. David SymondsNov 14, 2007
  16. Kristis MakrisNov 14, 2007
  17. Kristis MakrisAug 13, 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.