From 176e693e6861a46bb0a3581670380233203d5928 Mon Sep 17 00:00:00 2001 From: vg Date: Mon, 25 Nov 2019 07:34:31 +0100 Subject: update git-sync for simple merge cases Instead of using git merge --no-ff which always ensure no conflict, try to git merge covering simple cases (and automatically resolvable ones) at the cost of a merge commit but abort in case of conflicts needing manuable resolution. --- scripts/git-sync | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/git-sync b/scripts/git-sync index a9f07ac..aa1facc 100755 --- a/scripts/git-sync +++ b/scripts/git-sync @@ -23,5 +23,10 @@ if ! git diff --cached --quiet; then git commit -m "git-sync on ${HOSTNAME}" fi -git merge --ff-only +#git merge --ff-only +if ! git merge --quiet --no-edit; then + git merge --abort + exit 1 +fi + git push --quiet -- cgit v1.2.3