[gedit-plugins] git: Avoid caching the repo all the way up to the	workdir every time
- From: Garrett Regier <gregier src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gedit-plugins] git: Avoid caching the repo all the way up to the	workdir every time
 
- Date: Fri, 22 Aug 2014 16:44:11 +0000 (UTC)
 
commit 01e386b0c823f98cd92779b698dc5752a1578341
Author: Garrett Regier <garrettregier gmail com>
Date:   Sun Aug 17 16:40:57 2014 -0700
    git: Avoid caching the repo all the way up to the workdir every time
    
    This could be expensive on a repository with deeply nested
    directories.
 plugins/git/git/appactivatable.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/plugins/git/git/appactivatable.py b/plugins/git/git/appactivatable.py
index 217643f..3e76aca 100644
--- a/plugins/git/git/appactivatable.py
+++ b/plugins/git/git/appactivatable.py
@@ -98,6 +98,11 @@ class GitAppActivatable(GObject.Object, Gedit.AppActivatable):
             dir_location = dir_location.get_parent()
             dir_uri = dir_location.get_uri()
 
+            # Avoid caching the repo all the
+            # way up to the workdir each time
+            if dir_uri in self.__repos:
+                break
+
         return repo
 
 # ex:ts=4:et:
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]