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

Re: [PATCH] Clarify pre-push hook documentation

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 23, 2014, 20:12 UTC
Message-ID
<xmqqy500r7xk.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1395601709-78479-1-git-send-email-dcow90@gmail.com>
David Cowden <dcow90@gmail.com> writes:
Show 8 quoted lines
> The documentation as-is does not mention that the pre-push hook is
> executed even when there is nothing to push.  This can lead a new
> reader to beilieve there will always be lines fed to the script's
> standerd input and cause minor confusion as to what is happening
> when there are no lines provided to the pre-push script.
>
> Signed-off-by: David Cowden <dcow90@gmail.com>
> ---

The "everything is up to date; no need to have any data sent back to the other end" is one case two readers of the documentation may guess what should happen, one thinking "we know nothing is pushed---there is no need to even call pre-push", the other thinking "we should always call pre-push, and tell it what will be pushed, in this particular case, nothing". It is a good change to clarify that ambiguous expectation with the new paragraph.

Aren't there other cases that can invite ambuguous expectations in a similar way? For example, when there are differences between what they have and what we are updating it with but the update does not fast-forward?

> +The hook is executed regardless of whether there are changes to push or not.
> +In the event that there are no changes, no data will be provided on the
> +script's standard input.

What I am tryihng to get at is if "whether there are changes to push or not" is covering only too narrow a subset of cases where the readers may suffer from their expectations.

Thanks.
Previous: David CowdenNext: David Cowden
Message 3 of 10 in “Clarify pre-push hook documentation”
  1. Clarify pre-push hook documentationDavid Cowden, Mar 23, 2014
  2. Clarify pre-push hook documentationDavid Cowden, Mar 23, 2014
  3. Junio C HamanoMar 23, 2014
  4. Clarify pre-push hook documentationDavid Cowden, Mar 23, 2014
  5. Eric SunshineMar 24, 2014
  6. Clarify pre-push hook documentationDavid Cowden, Mar 24, 2014
  7. Clarify pre-push hook documentationDavid Cowden, Mar 24, 2014
  8. Junio C HamanoMar 25, 2014
  9. Philip OakleyMar 26, 2014
  10. David CowdenApr 8, 2014

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.