Commit c5cfb326 authored by loh.tar's avatar loh.tar
Browse files

Don't compute dotGitPath every time, use the existing one

parent 2895d928
......@@ -7,7 +7,6 @@
#include "kateprojectpluginview.h"
#include "fileutil.h"
#include "git/gitutils.h"
#include "gitwidget.h"
#include "kateproject.h"
#include "kateprojectinfoview.h"
......@@ -785,13 +784,11 @@ void KateProjectPluginView::slotUpdateStatus(bool 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(dotGitPath.value() + QStringLiteral(".git/index"));
if (auto widget = m_stackedGitViews->currentWidget()) {
static_cast<GitWidget *>(widget)->updateStatus();
if (auto widget = static_cast<GitWidget *>(m_stackedGitViews->currentWidget())) {
// To support separate-git-dir always use dotGitPath
// We need to add the path every time again because it's always a different file
m_gitChangedWatcher.addPath(widget->dotGitPath() + QStringLiteral(".git/index"));
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