From 24e97d18003e65787648061db7c23f0882f98d1a Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Fri, 22 Mar 2019 10:42:42 +0100 Subject: [PATCH] Use git diff instead of diff-index for setlocalversion. Avoid false positives. --- setlocalversion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setlocalversion b/setlocalversion index 221f868..30ad27c 100755 --- a/setlocalversion +++ b/setlocalversion @@ -14,7 +14,7 @@ compute_version() head=$(git rev-parse --verify --short HEAD) printf "~git-%s" "$head" # Check for uncommitted changes - if git diff-index --name-only HEAD | read dummy; then + if git diff --name-only HEAD | read dummy; then printf '%s' "-dirty" fi -- 2.39.5