From: Alan Knowles Date: Fri, 25 Aug 2017 05:18:49 +0000 (+0800) Subject: GitRepo.vala X-Git-Url: http://git.roojs.org/?p=gitlive;a=commitdiff_plain;h=2681e76dd731e20792cbac5af4f55f264cfcec12 GitRepo.vala --- diff --git a/GitRepo.vala b/GitRepo.vala index ab175581..2644b68d 100644 --- a/GitRepo.vala +++ b/GitRepo.vala @@ -164,16 +164,22 @@ public class GitRepo : Object public bool is_ignore(string fname) throws Error, SpawnError { + if (this.ignore_files.has_key(fname)) { + return this.ignore_files.get(fname); + } + try { var ret = this.git( { "check-ignore" , fname } ); + this.ignore_files.set(fname, ret == fname); return ret == fname; } catch (SpawnError e) { + this.ignore_files.set(fname, false); return false; } - - + } + /** * remove: * remove files to track.