submodule: use capture_command
authorJeff King <peff@peff.net>
Mon, 23 Mar 2015 03:53:56 +0000 (23:53 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Mar 2015 04:39:16 +0000 (21:39 -0700)
In is_submodule_commit_present, we call run_command followed
by a pipe read, which is prone to deadlock. It is unlikely
to happen in this case, as rev-list should never produce
more than a single line of output, but it does not hurt to
avoid an anti-pattern (and using the helper simplifies the
setup and cleanup).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found