subtree: don't let debug and progress output clash
authorLuke Shumaker <lukeshu@datawire.io>
Tue, 27 Apr 2021 21:17:42 +0000 (15:17 -0600)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Apr 2021 07:47:18 +0000 (16:47 +0900)
commit534ff90dbd74a81beee357220cfa026efc18fea6
treea34fb1e4d3e7ee501ac0d1b3e2ee5cac895d2181
parent5cdae0f6fd76bd1c12304240a17a5a12632fbb12
subtree: don't let debug and progress output clash

Currently, debug output (triggered by passing '-d') and progress output
stomp on each other.  The debug output is just streamed as lines to
stderr, and the progress output is sent to stderr as '%s\r'.  When
writing to a file, it is awkward to read and difficult to distinguish
between the debug output and a progress line.  When writing to a
terminal the debug lines hide progress lines.

So, when '-d' has been passed, spit out progress as 'progress: %s\n',
instead of as '%s\r', so that it can be detected, and so that the debug
lines don't overwrite the progress when written to a terminal.

Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/subtree/git-subtree.sh