Commit 2895d928 authored by loh.tar's avatar loh.tar
Browse files

Support separate-git-dir

parent f15f0d34
......@@ -7,6 +7,7 @@
#include "kateprojectpluginview.h"
#include "fileutil.h"
#include "git/gitutils.h"
#include "gitwidget.h"
#include "kateproject.h"
#include "kateprojectinfoview.h"
......@@ -783,8 +784,11 @@ void KateProjectPluginView::slotUpdateStatus(bool visible)
if (!visible) {
return;
}
// To support separate-git-dir we need some help of an utility
const auto dotGitPath = GitUtils::getDotGitPath(projectBaseDir());
// We need to add the path every time again because it's always a different file
m_gitChangedWatcher.addPath(projectBaseDir() + QStringLiteral("/.git/index"));
m_gitChangedWatcher.addPath(dotGitPath.value() + QStringLiteral(".git/index"));
if (auto widget = m_stackedGitViews->currentWidget()) {
static_cast<GitWidget *>(widget)->updateStatus();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment