From 70a64896aeff70be415c551fba5f649f5fa18e67 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 25 Aug 2017 13:04:08 +0800 Subject: [PATCH] GitRepo.vala --- GitRepo.vala | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/GitRepo.vala b/GitRepo.vala index 93a94e24..448345cd 100644 --- a/GitRepo.vala +++ b/GitRepo.vala @@ -159,6 +159,18 @@ public class GitRepo : Object } return ret; } + + public bool is_ignore(string fname) throws Error, SpawnError + { + try { + var ret = this.git( { "check-ignore" , fname } ); + return ret == fname; + } catch (SpawnError e) { + return false; + } + + + } /** * remove: @@ -244,7 +256,7 @@ public class GitRepo : Object public string pull () throws Error, SpawnError { // should probably hand error conditions better... - string[] cmd = { "pull" , "--no-edit", "origin", "HEAD" }; + string[] cmd = { "pull" , "--no-edit" }; return this.git( cmd ); @@ -264,6 +276,9 @@ public class GitRepo : Object return this.git({ "push", "origin", "HEAD" }); } + + + /** * git: * The meaty part.. run spawn.. with git.. -- 2.39.2