Junio C Hamano <gits...@pobox.com> writes:
> At least the attached patch is necessary.
Sorry, but the last hunk (see below) is not. It breaks the hook.
> In the longer term, we may want to discuss what should happen when
> the hook exited without even reading what we fed. My gut feeling is
> that we can still trust its exit status (a hook that was badly coded
> so it wanted to read from us and use that information to decide but
> somehow died before fully reading from us is not likely to exit with
> zero status, so we wouldn't diagnosing breakage as a success), but
> there may be downsides for being that lax.
> If we decide we want to be lax, then the call site of this hook and
> the pre-receive hook (is there any other "take info from the
> standard input" hook?) need to be modified so that they ignore
> sigpipe, I think.
> There was a related discussion around this issue about a year ago.
> @@ -38,6 +40,7 @@ COMMIT2="$(git rev-parse HEAD)"
> export COMMIT2
> write_script "$HOOK" <<'EOF'
> +cat >/dev/null
> echo "$1" >actual
> echo "$2" >>actual
> cat >>actual
As this one wants to keep the incoming data to "actual", we do not
want the extra "cat" to slurp everything in. Sorry for not being
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html