diff mbox series

[08/18] version-gen: simplify dirty check

Message ID 20230414121841.373980-9-felipe.contreras@gmail.com (mailing list archive)
State Superseded
Headers show
Series [01/18] version-gen: reorganize | expand

Commit Message

Felipe Contreras April 14, 2023, 12:18 p.m. UTC
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 GIT-VERSION-GEN | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 0021e88cdc..9be9e14204 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -4,10 +4,7 @@  GVF=GIT-VERSION-FILE
 DEF_VER=v2.40.GIT
 
 describe () {
-	VN=$(git describe --match "v[0-9]*" 2>/dev/null) || return 1
-	git update-index -q --refresh
-	test -z "$(git diff-index --name-only HEAD --)" ||
-	VN="$VN-dirty"
+	VN=$(git describe --match "v[0-9]*" --dirty 2>/dev/null) || return 1
 }
 
 # First see if there is a version file (included in release tarballs),