Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Clarify pre-push hook documentation

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:00:25

David Cowden [off-list ref] 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 <redacted>
---
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help