clone: send diagnostic messages to stderr
commit68b939b2f097b6675c4aaa178655559aa81b25cb
authorJeff King <peff@peff.net>
Wed, 18 Sep 2013 20:05:13 +0000 (18 16:05 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 18 Sep 2013 20:34:12 +0000 (18 13:34 -0700)
tree1c7fa9e2264491ead3357f6b8b33ae65f56ccb16
parente230c568c4b9a991e3175e5f65171a566fd8e39c
clone: send diagnostic messages to stderr

Putting messages like "Cloning into.." and "done" on stdout
is un-Unix and uselessly clutters the stdout channel. Send
them to stderr.

We have to tweak two tests to accommodate this:

  1. t5601 checks for doubled output due to forking, and
     doesn't actually care where the output goes; adjust it
     to check stderr.

  2. t5702 is trying to test whether progress output was
     sent to stderr, but naively does so by checking
     whether stderr produced any output. Instead, have it
     look for "%", a token found in progress output but not
     elsewhere (and which lets us avoid hard-coding the
     progress text in the test).

This should not regress any scripts that try to parse the
current output, as the output is already internationalized
and therefore unstable.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/clone.c
t/t5601-clone.sh
t/t5702-clone-options.sh