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

Re: [PATCH] add a 'pre-push' hook

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 19, 2008, 19:39 UTC
Message-ID
<7v63pw3ick.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<d411cc4a0808191200o39837fd0ka2530aed870e06b0@mail.gmail.com>
"Scott Chacon" <schacon@gmail.com> writes:
> If the patch is acceptable, I will update the githooks doc with more
> information, but we would like this so that you could add a hook that
> runs your automated tests before a push would go through.

I've said this number of times on this list but I guess it has been while since the last time I said it.

"If the patch is acceptable, I'll document it" is the last thing we as reviewers would want to hear from the submitter, *unless* there is an ongoing discussion that already have established what is wanted and a patch came as "ok, here is a possible solution, what do you guys think?".

If the original submitter does not care enough to defend why it is needed, why should reviewers spend their precious brain cycles to decipher what it does, guess what situation the change would help, and determine if the change actually would help the situation it might be trying to help (and risk wasting all this work because they guessed the motivation wrong)? And what assurance would we have that the change will be maintained and supported?

Having said that, I would agree "validate and potentially stop before pushing" is a very good thing to have.

It is still unclear at this point what kind of input that validation would want to base its decision on. At least we would want what branch is being pushed (so that a validation failure on a branch that is not being pushed would not interfere), and possibly where you are pushing to (so that you can still push a change you would want to verify and potentially polish on a different test/dev box without getting interfered).

Previous: Jeff KingNext: Scott Chacon
Message 12 of 15 in “add a 'pre-push' hook”
  1. add a 'pre-push' hookScott Chacon, Aug 19, 2008
  2. Jeff KingAug 19, 2008
  3. Scott ChaconAug 19, 2008
  4. Jeff KingAug 19, 2008
  5. Shawn O. PearceAug 19, 2008
  6. Scott ChaconAug 19, 2008
  7. しらいしななこAug 19, 2008
  8. Scott ChaconAug 19, 2008
  9. Junio C HamanoAug 19, 2008
  10. Sam VilainAug 19, 2008
  11. Jeff KingAug 20, 2008
  12. Junio C HamanoAug 19, 2008
  13. Scott ChaconAug 19, 2008
  14. Junio C HamanoAug 19, 2008
  15. Shawn O. PearceAug 19, 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.