• Torstein Hegge's avatar
    branch: fix --verbose output column alignment · 6b364d48
    Torstein Hegge authored
    Commit f2e08739 (branch: report invalid tracking branch as gone) removed
    an early return from fill_tracking_info() in the path taken when 'git
    branch -v' lists a branch in sync with its upstream. This resulted in an
    unconditionally added space in front of the subject line:
        $ git branch -v
        * master f5eb3da  commit pushed to upstream
          topic  f935eb6 unpublished topic
    Instead, only add the trailing space if a decoration have been added.
    To catch this kind of whitespace breakage in the tests, be a bit less
    smart when filtering the output through sed.
    Signed-off-by: default avatarTorstein Hegge <[email protected]>
    Signed-off-by: default avatarJunio C Hamano <[email protected]>
t6040-tracking-info.sh 5.16 KB