Visualize local branch heads in commits panel
We want to mark all local branch heads with a "*" in the local commits panel, to make it easier to see how branches are stacked onto each other. In order to not confuse users with "*" markers that they don't understand, do this only for the case where users actually use stacked branches; those users are likely not going to be confused by the display. This means we want to filter out a few branch heads that shouldn't get the marker: the current branch, any main branch, and any old branch that has been merged to master already.
This commit is contained in:
@@ -10,7 +10,9 @@ var DropTodoCommitWithUpdateRef = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.GetUserConfig().Git.MainBranches = []string{"master"}
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
CreateNCommits(1).
|
||||
@@ -28,7 +30,7 @@ var DropTodoCommitWithUpdateRef = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Contains("CI commit 07").IsSelected(),
|
||||
Contains("CI commit 06"),
|
||||
Contains("CI commit 05"),
|
||||
Contains("CI commit 04"),
|
||||
Contains("CI * commit 04"),
|
||||
Contains("CI commit 03"),
|
||||
Contains("CI commit 02"),
|
||||
Contains("CI commit 01"),
|
||||
@@ -40,8 +42,8 @@ var DropTodoCommitWithUpdateRef = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Contains("pick").Contains("CI commit 07"),
|
||||
Contains("pick").Contains("CI commit 06"),
|
||||
Contains("pick").Contains("CI commit 05"),
|
||||
Contains("update-ref").Contains("branch1"),
|
||||
Contains("pick").Contains("CI commit 04"),
|
||||
Contains("update-ref").Contains("branch1").DoesNotContain("*"),
|
||||
Contains("pick").Contains("CI * commit 04"),
|
||||
Contains("pick").Contains("CI commit 03"),
|
||||
Contains("<-- YOU ARE HERE --- commit 02"),
|
||||
Contains("CI commit 01"),
|
||||
@@ -56,7 +58,7 @@ var DropTodoCommitWithUpdateRef = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Lines(
|
||||
Contains("CI commit 07"),
|
||||
Contains("CI commit 05"),
|
||||
Contains("CI commit 04"),
|
||||
Contains("CI * commit 04"),
|
||||
Contains("CI commit 03"),
|
||||
Contains("CI commit 02"),
|
||||
Contains("CI commit 01"),
|
||||
|
||||
Reference in New Issue
Block a user