aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvg <vgm+dev@devys.org>2019-07-20 08:29:59 +0200
committervg <vgm+dev@devys.org>2019-07-20 08:29:59 +0200
commit6747e12f8f57b1c62308d3d509927f0af6f2498d (patch)
tree86f45f18e739e1245bfad39f35b1199cc9e3e18c
parent87ec9b2f30b6aa39481ea586447078967447c22f (diff)
downloadscripts-6747e12f8f57b1c62308d3d509927f0af6f2498d.tar.gz
scripts-6747e12f8f57b1c62308d3d509927f0af6f2498d.tar.bz2
scripts-6747e12f8f57b1c62308d3d509927f0af6f2498d.zip
modify git-sync to simpler and one-command change detection
-rwxr-xr-xscripts/git-sync2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/git-sync b/scripts/git-sync
index cddacdd..e0117d7 100755
--- a/scripts/git-sync
+++ b/scripts/git-sync
@@ -37,7 +37,7 @@ if [ "$verbose" -ne 0 ]; then
echo 'Sync: git autocommit'
fi
git add -A "./$(git rev-parse --show-cdup)"
-if git status --porcelain | grep -q .; then
+if ! git diff --cached --quiet; then
git status --short
git commit -m "Auto-commit on ${hostident}"
fi