git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: David Cowden <dcow90@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Clarify pre-push hook documentation
Date: Sun, 23 Mar 2014 13:12:07 -0700	[thread overview]
Message-ID: <xmqqy500r7xk.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1395601709-78479-1-git-send-email-dcow90@gmail.com> (David Cowden's message of "Sun, 23 Mar 2014 12:08:29 -0700")

David Cowden <dcow90@gmail.com> writes:

> 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.

  reply	other threads:[~2014-03-23 20:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-23 19:01 [PATCH] Clarify pre-push hook documentation David Cowden
2014-03-23 19:08 ` David Cowden
2014-03-23 20:12   ` Junio C Hamano [this message]
2014-03-23 19:18 ` David Cowden
2014-03-24  1:40 ` Eric Sunshine
2014-03-24 23:43 ` [PATCH v2] " David Cowden
2014-03-24 23:51   ` [PATCH v3] " David Cowden
2014-03-25 17:11     ` Junio C Hamano
2014-03-26 23:21       ` Philip Oakley
2014-04-08  8:43         ` David Cowden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqy500r7xk.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=dcow90@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).