+
+
+ }
+
+ public bool is_managed()
+ {
+ GLib.debug("is_managed: %d", this.repo.get_config().get_int32("gitlive.managed"));
+ return this.repo.get_config().get_int32("gitlive.managed") == 1;
+ }
+
+
+ public bool is_autocommit ()
+ {
+ GLib.debug("is_autocommit: %d", this.repo.get_config().get_int32("gitlive.autocommit"));
+ return this.repo.get_config().get_int32("gitlive.autocommit") == 1;
+ }
+ public void set_autocommit(bool val)
+ {
+ this.repo.get_config().set_int32("gitlive.autocommit", val ? "1" : "0");
+
+ }
+
+ public bool doMergeClose(string commit_message)
+ {
+ this.loadLocalBranches(true);
+ var oldbranch = this.head.get_name();
+
+ string [] cmd = { "merge", "--squash", oldbranch };
+ this.git( cmd );
+ cmd = { "commit", "-a" , "-m", commit_message };
+ this.git( cmd );
+ this.push();
+ this.loadBranches(); // updates lastrev..
+
+ var notification = new Notify.Notification(
+ "Merged branch %s to %s".printf(oldbranch, master),
+ "",
+ "dialog-information"
+
+ );
+
+ notification.set_timeout(5);
+ notification.show();
+
+
+
+
+ public bool is_auto_branch ()
+ {
+ if (this.name == "gitlog") {
+ return false;
+ }
+ // check remote...
+ if (this.is_managed()) {
+ return true;
+ }
+ return false;
+
+
+ }
+
+ public void loadRemoteHeads(bool force = false)
+ {
+
+ if (!force && this.remote_heads != null) {
+ return;
+ }
+ var r = this.repo.lookup_remote("origin");
+ r.connect(Ggit.Direction.FETCH, this.callbacks, null, null);
+ this.remote_heads = r.list();
+