Merge branch 'jk/run-command-capture'
authorJunio C Hamano <gitster@pobox.com>
Wed, 25 Mar 2015 19:54:27 +0000 (12:54 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Mar 2015 19:54:27 +0000 (12:54 -0700)
The run-command interface was easy to abuse and make a pipe for us
to read from the process, wait for the process to finish and then
attempt to read its output, which is a pattern that lead to a
deadlock. Fix such uses by introducing a helper to do this
correctly (i.e. we need to read first and then wait the process to
finish) and also add code to prevent such abuse in the run-command
helper.

* jk/run-command-capture:
run-command: forbid using run_command with piped output
trailer: use capture_command
submodule: use capture_command
wt-status: use capture_command
run-command: introduce capture_command helper
wt_status: fix signedness mismatch in strbuf_read call
wt-status: don't flush before running "submodule status"

1  2 
run-command.c
wt-status.c
diff --cc run-command.c
Simple merge
diff --cc wt-status.c
Simple merge