forked from qt-creator/qt-creator
Git: Fix filling commit selection combobox for log
Broken by commit cbb70513bf, which changed the
format for the normal log to override the highlighter.
We still need the hightlighter for the log with diff.
Therefore, a separation between highlighting
and parsing the log is needed to populate the
combobox for commit selection again.
Change-Id: I902ce548fc25875f2cd67b165283ff1236329afa
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
André Hartmann
parent
9c71e41ad1
commit
d1b0966996
@@ -1048,7 +1048,7 @@ static QStringList normalLogArguments()
|
||||
|
||||
const QString logArgs = QStringLiteral(
|
||||
"--pretty=format:"
|
||||
"Commit: %C(%1)%H%Creset %C(%2)%d%Creset%n"
|
||||
"commit %C(%1)%H%Creset %C(%2)%d%Creset%n"
|
||||
"Author: %C(%3)%an <%ae>%Creset%n"
|
||||
"Date: %C(%4)%cD%Creset%n%n"
|
||||
"%C(%5)%s%Creset%n%n%b%n"
|
||||
@@ -1092,8 +1092,12 @@ void GitClient::log(const QString &workingDirectory, const QString &fileName,
|
||||
arguments << "-n" << QString::number(logCount);
|
||||
|
||||
arguments << argWidget->arguments();
|
||||
if (arguments.contains(patchOption))
|
||||
if (arguments.contains(patchOption)) {
|
||||
arguments.removeAll(colorOption);
|
||||
editor->setHighlightingEnabled(true);
|
||||
} else {
|
||||
editor->setHighlightingEnabled(false);
|
||||
}
|
||||
if (!arguments.contains(graphOption) && !arguments.contains(patchOption))
|
||||
arguments << normalLogArguments();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user