summaryrefslogtreecommitdiffhomepage
path: root/scripts/localization
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2025-10-15 14:23:38 +0200
committerLinus Färnstrand <linus@mullvad.net>2025-10-16 09:38:32 +0200
commit77853d7297269c09c998d3c0927aaae10148232f (patch)
treedf96237c8fb4c5f4a18956677319cbe2565fe0b4 /scripts/localization
parentc6d0ab25db2e6554b666ef5109c153b6a5936ad8 (diff)
downloadmullvadvpn-77853d7297269c09c998d3c0927aaae10148232f.tar.xz
mullvadvpn-77853d7297269c09c998d3c0927aaae10148232f.zip
Use git diff-index to check for dirty working directory
Should be functionally equivalent to the previous code, but cleaner and simpler
Diffstat (limited to 'scripts/localization')
-rwxr-xr-xscripts/localization2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/localization b/scripts/localization
index 084f61661c..965ca0ff17 100755
--- a/scripts/localization
+++ b/scripts/localization
@@ -51,7 +51,7 @@ function update_relay_locations_pot {
}
function commit_changes {
- if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then
+ if ! git diff-index --quiet HEAD --; then
git commit -a -S -m "$1"
fi
}