Meta/V: correct -dirty output
Junio C Hamano committed
Sep 9, 2022 at 15:09 UTC
bd930c832520fe7aac5535d682fc91e1266caca6
1 file changed
+8
-3
V
+8
-3
@@ -14,7 +14,7 @@ inst_prefix=$(
14
echo $HOME
15
)
16
17
-for v in maint master next seen jch
17
+for v in maint master next jch seen
18
do
19
installed=$(
20
test -f "$inst_prefix/git-$v/bin/git" &&
@@ -41,7 +41,12 @@ do
41
if test "z$version" = "z$revision"
42
then
43
in= out=
44
- installed=$dirty
44
+ if test -z "$dirty"
45
+ then
46
+ installed=
47
+ else
48
+ installed=" $installed$dirty"
49
+ fi
50
elif test -z "$version"
51
then
52
in="[41;37m" out="[m"
@@ -56,5 +61,5 @@ do
61
esac
62
in="[41;37m" out="[m" installed=" $installed"
63
fi
59
- echo "$in$v$out $(git describe refs/heads/$v)$installed"
64
+ echo "$in$v$out$installed $(git describe refs/heads/$v)"
65
done