Git: Add "show all branches" option to log window

Seems most useful for file logs, but it can also help
the keep the overview of several work branches.

Change-Id: I7f794c6f7ed22351a5e0da5806fa3934cfa4bbff
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Andre Hartmann
2024-10-03 12:50:49 +02:00
committed by André Hartmann
parent 1b47aaef2c
commit 293dd59c2b
3 changed files with 7 additions and 0 deletions

View File

@@ -647,6 +647,11 @@ public:
GitLogConfig(bool fileRelated, GitEditorWidget *editor) GitLogConfig(bool fileRelated, GitEditorWidget *editor)
: GitBaseConfig(editor) : GitBaseConfig(editor)
{ {
QAction *allBranchesButton =
addToggleButton(QStringList{"--all"},
Tr::tr("All"),
Tr::tr("Show log for all local branches."));
mapSetting(allBranchesButton, &settings().allBranches);
QAction *firstParentButton = QAction *firstParentButton =
addToggleButton({"-m", "--first-parent"}, addToggleButton({"-m", "--first-parent"},
Tr::tr("First Parent"), Tr::tr("First Parent"),

View File

@@ -113,6 +113,7 @@ GitSettings::GitSettings()
colorLog.setSettingsKey("ColorLog"); colorLog.setSettingsKey("ColorLog");
colorLog.setDefaultValue(true); colorLog.setDefaultValue(true);
allBranches.setSettingsKey("AllBranches");
firstParent.setSettingsKey("FirstParent"); firstParent.setSettingsKey("FirstParent");
followRenames.setSettingsKey("FollowRenames"); followRenames.setSettingsKey("FollowRenames");

View File

@@ -33,6 +33,7 @@ public:
Utils::FilePathAspect repositoryBrowserCmd{this}; Utils::FilePathAspect repositoryBrowserCmd{this};
Utils::BoolAspect graphLog{this}; Utils::BoolAspect graphLog{this};
Utils::BoolAspect colorLog{this}; Utils::BoolAspect colorLog{this};
Utils::BoolAspect allBranches{this};
Utils::BoolAspect firstParent{this}; Utils::BoolAspect firstParent{this};
Utils::BoolAspect followRenames{this}; Utils::BoolAspect followRenames{this};
Utils::IntegerAspect lastResetIndex{this}; Utils::IntegerAspect lastResetIndex{this};