Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'GIT-VERSION-GEN')
-rwxr-xr-xGIT-VERSION-GEN9
1 files changed, 9 insertions, 0 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 7763639a82..73aaff0a29 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -10,6 +10,15 @@ VN=$(cat version) ||
VN="$DEF_VER"
VN=$(expr "$VN" : v*'\(.*\)')
+
+dirty=$(sh -c 'git-diff-index --name-only HEAD' 2>/dev/null) || dirty=
+case "$dirty" in
+'')
+ ;;
+*)
+ VN="$VN-dirty" ;;
+esac
+
if test -r $GVF
then
VC=$(sed -e 's/^GIT_VERSION = //' <$GVF)