forked from qt-creator/qt-creator
VCS[git]: Added showing logs of all branches
This commit is contained in:
@@ -291,7 +291,7 @@ void GitClient::status(const QString &workingDirectory)
|
||||
static const char graphLogFormatC[] = "%h %an %s %ci";
|
||||
|
||||
// Create a graphical log.
|
||||
void GitClient::graphLog(const QString &workingDirectory)
|
||||
void GitClient::graphLog(const QString &workingDirectory, const QString & branch)
|
||||
{
|
||||
if (Git::Constants::debug)
|
||||
qDebug() << "log" << workingDirectory;
|
||||
@@ -304,7 +304,13 @@ void GitClient::graphLog(const QString &workingDirectory)
|
||||
arguments << (QLatin1String("--pretty=format:") + QLatin1String(graphLogFormatC))
|
||||
<< QLatin1String("--topo-order") << QLatin1String("--graph");
|
||||
|
||||
const QString title = tr("Git Log");
|
||||
QString title;
|
||||
if (branch.isEmpty()) {
|
||||
title = tr("Git Log");
|
||||
} else {
|
||||
title = tr("Git Log %1").arg(branch);
|
||||
arguments << branch;
|
||||
}
|
||||
const QString editorId = QLatin1String(Git::Constants::GIT_LOG_EDITOR_ID);
|
||||
const QString sourceFile = VCSBase::VCSBaseEditor::getSource(workingDirectory, QStringList());
|
||||
VCSBase::VCSBaseEditor *editor = createVCSEditor(editorId, title, sourceFile, false, "logFileName", sourceFile);
|
||||
|
||||
Reference in New Issue
Block a user