]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Meta/V: correct -dirty output
authorJunio C Hamano <gitster@pobox.com>
Fri, 9 Sep 2022 22:09:53 +0000 (15:09 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Sep 2022 22:09:53 +0000 (15:09 -0700)
V

diff --git a/V b/V
index 77f00040e899846a7e17aad1c920c1529f8b02b9..158183918df1892853242acfdfd4ba9a6812938f 100755 (executable)
--- a/V
+++ b/V
@@ -14,7 +14,7 @@ inst_prefix=$(
        echo $HOME
 )
 
-for v in maint master next seen jch
+for v in maint master next jch seen
 do
        installed=$(
                test -f "$inst_prefix/git-$v/bin/git" &&
@@ -41,7 +41,12 @@ do
        if test "z$version" = "z$revision"
        then
                in= out=
-               installed=$dirty
+               if test -z "$dirty"
+               then
+                       installed=
+               else
+                       installed="     $installed$dirty"
+               fi
        elif test -z "$version"
        then
                in="\e[41;37m" out="\e[m"
@@ -56,5 +61,5 @@ do
                esac
                in="\e[41;37m" out="\e[m" installed="     $installed"
        fi
-       echo "$in$v$out $(git describe refs/heads/$v)$installed"
+       echo "$in$v$out$installed       $(git describe refs/heads/$v)"
 done