From 35798d4ad6603c6bcbff1bbafdb07d10cfab96a9 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Tue, 6 Aug 2013 15:14:54 +0300 Subject: VCS: Use a single filename for log The list always contains a single entry (or none) anyway Take 2. This time it actually compiles ;-) Change-Id: I71a9822360a9b569ba79afa0f575e27918bb2e03 Reviewed-by: Tobias Hunger --- src/plugins/git/gitplugin.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/plugins/git/gitplugin.cpp') diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 6801a97390..2df9f0b087 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -744,7 +744,9 @@ void GitPlugin::diffCurrentProject() { const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasProject(), return); - m_gitClient->diff(state.currentProjectTopLevel(), state.relativeCurrentProject()); + const QString relativeProject = state.relativeCurrentProject(); + m_gitClient->diff(state.currentProjectTopLevel(), + relativeProject.isEmpty() ? QStringList() : QStringList(relativeProject)); } void GitPlugin::diffRepository() @@ -758,7 +760,7 @@ void GitPlugin::logFile() { const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasFile(), return); - m_gitClient->log(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()), true); + m_gitClient->log(state.currentFileTopLevel(), state.relativeCurrentFile(), true); } void GitPlugin::blameFile() -- cgit v1.2.1