New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch between multiple log views #3354
base: master
Are you sure you want to change the base?
Switch between multiple log views #3354
Conversation
Why constrain ourselves to two? Why not add It is backwards compatible, albeit maybe a bit odd to have both singular and plural, but we could easily modify the config to use the updated version. |
It's a good suggestion. And I guess that in the edge case where the user decides to have both |
@mark2185 I've updated the PR with your suggestion, please let me know if the change is okay. |
t.Views().Status(). | ||
Focus(). | ||
Press(keys.Status.AllBranchesLogGraph) | ||
t.Views().Main().Content(Contains("view1")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd maybe also add the check that it does not contain view2 at the same time. Just to be extra sure it's not displaying view1view2
somehow.
Looks good! All that remains is updating the docs and cleaning up the history a bit:
|
5a472b0
to
eeb4e6a
Compare
Apologies, I think I squashed the original commit that you commented on. I've updated the docs and improved the test case. Let me know if there is any other documentation that needs to be updated? |
docs/Config.md
Outdated
@@ -120,6 +120,7 @@ git: | |||
fetchAll: true # Pass --all flag when running git fetch. Set to false to fetch only origin (or the current branch's upstream remote if there is one) | |||
branchLogCmd: 'git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --' | |||
allBranchesLogCmd: 'git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium' | |||
allBranchesLogCmds: '' # a list of your favorite log commands (pressing 'a' in the status panel will cycle between them) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the default be []
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mark2185 Fixed. Thanks a bunch for the feedback thus far, it's appreciated 🙏🏻
Other this one minor nitpick, looks good to me! :) |
All that's left is appeasing the CI and I think it's good to ship. |
@mark2185 Not sure what's up with the code coverage tool, but everything else is green now |
Not sure, to be frank. Also you can squash all the commits now. @stefanhaller I'm hoping you might have an ace up your sleeve regarding the code coverage. |
It's a known problem, this step currently always fails for PRs created from a fork. |
- Introduced a new optional user config command, allBranchesLogCmds - When pressing 'a' in the Status view, cycle between non-empty, non-identical log commands - There will always be at least one command to run, since allBranhesLogCmd has a default - Update documentation & write an integration test - Update translation string
0599049
to
41cefaf
Compare
Done |
Seeing as the last activity related to this issue was over a year ago, I decided to take a stab at this.
The implementation should be fully backwards compatible. Simply add
allBranchesLogCmdAlt1
and/orallBranchesLogCmdAlt2
to your config file to use them when cycling between log commands using 'a'.You can even use
allBranchesLogCmdAlt2
together withallBranchesLogCmd
(skippingallBranchesLogCmdAlt1
) if you want, it should not affect usability.This is my first contribution to LazyGit, but I have experience with Go.
Changes:
Introduced two new optional user config commands, allBranchesLogCmdAlt1+2
When pressing 'a' in the Status view, cycle between non-empty, non-identical log commands
There will always be at least one command to run, since allBranhesLogCmd has a default
Please check if the PR fulfills these requirements
go generate ./...
)docs/Config.md
) have been updated if necessary