File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 33for v in maint master next pu jch
44do
55 installed=$( $HOME /git-$v /bin/git version)
6+ dirty=
67 if version=$( expr " $installed " : ' .*\.g\([0-9a-f]*\)$' )
78 then
89 :
10+ elif version=$( expr " $installed " : ' .*\.g\([0-9a-f]*\)\.dirty$' )
11+ then
12+ dirty=t
913 elif version=v$( expr " $installed " : \
1014 ' git version \(.*\)\.rc[0-9]*$' )
1115 then
1923 revision=$( git show-ref -s --verify " refs/heads/$v " )
2024 if test " z$version " = " z$revision "
2125 then
22- in= out= installed=
26+ in= out=
27+ installed=${dirty: +" (with changes)" }
2328 else
2429 installed=$( git describe $version )
30+ case " $dirty " in
31+ t)
32+ installed=" $installed .dirty"
33+ esac
2534 in=" [41;37m" out=" [m" installed=" $installed "
2635 fi
2736 echo " $in$v$out $( git describe refs/heads/$v ) $installed "
You can’t perform that action at this time.
0 commit comments