From df7967d0f640ee80ad070016b6a2d1020ed01328 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 19 Dec 2018 12:04:07 +0800 Subject: [PATCH] GitRepo.vala --- GitRepo.vala | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/GitRepo.vala b/GitRepo.vala index 59633f31..936ecd55 100644 --- a/GitRepo.vala +++ b/GitRepo.vala @@ -220,20 +220,10 @@ public class GitRepo : Object { return this.get_config("autocommit") == "1"; } + public void set_autocommit(bool val) { - - var cur = this.is_autocommit(); - GLib.debug("SET auto commit : %s <= %s", val ? "ON" : "OFF", cur ? "ON" : "OFF"); - if (cur == val) { - return; // no change.. - } - if (!val) { - FileUtils.set_contents(this.gitdir + "/.gitlive-disable-autocommit" , "x"); - } else { - // it exists... - FileUtils.remove(this.gitdir + "/.gitlive-disable-autocommit" ); - } + this.set_config("autocommit", val ? "1" : "0"); } -- 2.39.2