Git: Enable "First Parent" display in log editor

Shows merge commits instead of recursing into them.

When Diff is enabled, it will be done against the merge commit's parent,
rather than showing conflict resolution.

Change-Id: Iaa3ac622ffde34e58763a968d387041e0ef99b21
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2015-08-09 22:04:10 +03:00
committed by Orgad Shaneh
parent c844071627
commit fd6b3cd484
3 changed files with 8 additions and 0 deletions

View File

@@ -444,6 +444,11 @@ public:
connect(diffButton, &QAction::toggled, m_ignoreWSButton, &QAction::setVisible);
m_patienceButton->setVisible(diffButton->isChecked());
m_ignoreWSButton->setVisible(diffButton->isChecked());
QAction *firstParentButton =
addToggleButton({ "-m", "--first-parent" },
tr("First Parent"),
tr("Follow only the first parent on merge commits."));
mapSetting(firstParentButton, settings.boolPointer(GitSettings::firstParentKey));
const QStringList graphArguments = {
"--graph", "--oneline", "--topo-order",
QLatin1String("--pretty=format:") + graphLogFormatC