From: Junio C Hamano Date: Fri, 9 Sep 2022 22:09:53 +0000 (-0700) Subject: Meta/V: correct -dirty output X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd930c832520fe7aac5535d682fc91e1266caca6;p=thirdparty%2Fgit.git Meta/V: correct -dirty output --- diff --git a/V b/V index 77f00040e8..158183918d 100755 --- 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="" out="" @@ -56,5 +61,5 @@ do esac in="" out="" installed=" $installed" fi - echo "$in$v$out $(git describe refs/heads/$v)$installed" + echo "$in$v$out$installed $(git describe refs/heads/$v)" done