git:track: Fix unnecessary subshell launch

While at it, modify the formatting of the line above slightly.
This commit is contained in:
2025-08-25 13:54:41 +02:00
parent 5767210dce
commit 4c12418b62

View File

@@ -22,9 +22,8 @@ git for-each-ref --format='%(upstream),%(refname)' refs/heads "${@/#/refs/remote
s:,/:,:g
s:(^|\n)([^,]+),\n\2:\1\2:g
s:(^|\n)([^/,]*)([^\n]*\n\2(,|/))*:\n,\n&:g
s:\n,\n+$:\n:
' \
| (echo remote,local; cat) \
s:\n,\n+$:\n:' \
| { echo remote,local; cat; } \
| sed -E 's:(.*),(.*):\2,\1:g; s:^,: ,:; s:,$:, :' \
| column -ts, \
| sed '2d; 1{p;s/./―/g}'