Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: t5401-update-hooks test failure

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:12

"Shawn O. Pearce" [off-list ref] writes:
The only way I can see this missing message happening is if the C
library isn't flushing the stdio buffer before the hook process
exits.  Given that the hook process is a /bin/sh shell script,
and its using echo to print its messages... I'm at a loss for how
to fix that in Git.

Unless its the recv_sideband() somehow skipping a line.  But I
can't see it doing that.
The detection method of test is fooled by intermixed message.

This is what send.err has, and you grep for '^remote:' in it.

-- >8 --
warning: updating the current branch
warning: Updating the currently cheremote: STDERR pre-receive        
,
warning: as the index and work tree do not reflect changes that are in HEAD.
warning: As a result, you may see the changes you just pushed into it
warning: reverted when you run 'git diff' over there, and you may want
warning: to run 'git reset --hard' before starting to work to recover.
warning: 
warning: You can set 'receive.denyCurrentBranch' configuration variable to
warning: 'refuse' in the remote repository to forbid pushing into its
warning: current branch.
warning: To allow pushing into the current branch, you can set it to 'ignore';
warning: but this is not recommended unless you arranged to update its work
warning: tree to match what you pushed in some other way.
warning: 
warning: To squelch this message, you can set it to 'warn'.
warning: 
warning: Note that the default will change in a future version of git
warning: to refuse updating the current branch unless you have the
warning: configuration variable set to either 'ignore' or 'warn'.
remote: STDOUT update refs/heads/master        
remote: STDERR update refs/heads/master        
remote: STDOUT update refs/heads/tofail        
remote: STDERR update refs/heads/tofail        
error: hook declined to update refs/heads/tofail
remote: STDOUT post-receive        
remote: STDERR post-receive        
remote: STDOUT post-update        
remote: STDERR post-update        
To ./victim/.git
   d4f8e4a..b07e5b8  master -> master
 ! [remote rejected] tofail -> tofail (hook declined)
-- 8< --

But there indeed _is_ some skipping.  "Updating the currently che"
is interrupted by the output from the pre-receive hook, and I do not see
the remainder "cked out branch may cause confusion,\n" anywhere.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help