From 2681e76dd731e20792cbac5af4f55f264cfcec12 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 25 Aug 2017 13:18:49 +0800 Subject: [PATCH] GitRepo.vala --- GitRepo.vala | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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. -- 2.39.2