diff --git a/src/plugins/git/ide-git-vcs.c b/src/plugins/git/ide-git-vcs.c index 33f539290c177fb46e1ebfe62c8f2e408fe99678..bd528c8b1e8c0b6d7dc8edc36c1e3dfc13a214c6 100644 --- a/src/plugins/git/ide-git-vcs.c +++ b/src/plugins/git/ide-git-vcs.c @@ -281,7 +281,9 @@ ide_git_vcs_load (IdeGitVcs *self, const gchar *branch; g_clear_object (&location); - location = g_file_new_for_path (line + strlen ("gitdir: ")); + location = g_file_resolve_relative_path ( + g_file_get_parent (project_file), + line + strlen ("gitdir: ")); /* * Worktrees only have a single branch, and it is the name