]> git.ipfire.org Git - thirdparty/git.git/commit
subtree: have $indent actually affect indentation
authorLuke Shumaker <lukeshu@datawire.io>
Tue, 27 Apr 2021 21:17:43 +0000 (15:17 -0600)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Apr 2021 07:47:18 +0000 (16:47 +0900)
commite9525a8a0291eb5ef0a81473d2b8c4d4b3b198c8
treea2936a58a4f3a0b0be588da78375d5945eadea7a
parent534ff90dbd74a81beee357220cfa026efc18fea6
subtree: have $indent actually affect indentation

Currently, the $indent variable is just used to track how deeply we're
nested, and the debug log is indented by things like

   debug "  foo"

That is: The indentation-level is hard-coded.  It used to be that the
code couldn't recurse, so the indentation level could be known
statically, so it made sense to just hard-code it in the
output. However, since 315a84f9aa ("subtree: use commits before rejoins
for splits", 2018-09-28), it can now recurse, and the debug log is
misleading.

So fix that.  Indent according to $indent.

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