[gnome-builder] git: use .git/refs/heads/ for file monitor



commit 47e05221bef5b07dcbeaa9c73d34509cfbf90f38
Author: Christian Hergert <christian hergert me>
Date:   Sat Apr 25 17:23:28 2015 -0700

    git: use .git/refs/heads/ for file monitor
    
    This still isn't ideal, since we aren't even being careful about what the
    change is or to which branch the change is for.
    
    However, it does result in our change monitor properly updating the lines
    in the gutter of the current document.

 libide/git/ide-git-vcs.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libide/git/ide-git-vcs.c b/libide/git/ide-git-vcs.c
index 511d744..363f1fe 100644
--- a/libide/git/ide-git-vcs.c
+++ b/libide/git/ide-git-vcs.c
@@ -431,12 +431,12 @@ ide_git_vcs_load_monitor (IdeGitVcs  *self,
     {
       g_autoptr(GFile) location = NULL;
       g_autoptr(GFileMonitor) monitor = NULL;
-      g_autoptr(GFile) index_file = NULL;
+      g_autoptr(GFile) heads_dir = NULL;
       GFileMonitorFlags flags = G_FILE_MONITOR_WATCH_MOUNTS;
 
       location = ggit_repository_get_location (self->repository);
-      index_file = g_file_get_child (location, "index");
-      monitor = g_file_monitor_file (index_file, flags, NULL, error);
+      heads_dir = g_file_get_child (location, "refs/heads");
+      monitor = g_file_monitor (heads_dir, flags, NULL, error);
 
       ret = !!monitor;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]