aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/git-sync6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/git-sync b/scripts/git-sync
index 10fc0c5..fa4d786 100755
--- a/scripts/git-sync
+++ b/scripts/git-sync
@@ -32,7 +32,8 @@ fi
echo 'Sync: git autocommit'
git add -A "./$(git rev-parse --show-cdup)"
-if git commit --dry-run --short; then
+if git status --porcelain | grep -q .; then
+ git status --short
git commit -m "Auto-commit on ${hosthash}"
fi
@@ -64,7 +65,8 @@ git status --porcelain | while read -r filename; do
done
# no action is done if there is nothing to commit
-if git commit --dry-run --short; then
+if git status --porcelain | grep -q .; then
+ git status --short
git commit -m "$conflict_message"
fi