Skip to content

allBranchesLogCmds always includes default log command #3961

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
MartinHammarstedt opened this issue Oct 3, 2024 · 2 comments · May be fixed by #4345
Open

allBranchesLogCmds always includes default log command #3961

MartinHammarstedt opened this issue Oct 3, 2024 · 2 comments · May be fixed by #4345
Labels
bug Something isn't working

Comments

@MartinHammarstedt
Copy link

Describe the bug

According to the config documentation, the setting git.allBranchesLogCmd is deprecated in favor of git.allBranchesLogCmds. As far as I understand the following two configurations should be equal:

git:
  allBranchesLogCmd: git log --graph --oneline
git:
  allBranchesLogCmds:
    - git log --graph --oneline

However, when using allBranchesLogCmds, the default log command seems to be included in the cycle, meaning that you can't limit it to your desired configurations.

To Reproduce
Steps to reproduce the behavior:

  1. Use the above git.allBranchesLogCmds setting with one single log command.
  2. Go to the Status panel.
  3. Tap a to display the log.
  4. Tap a again, and notice that it now shows a differently formatted log.

Similarly if you have the gui.statusPanelView: allBranchesLog setting activated, you'll get a different log view every time you navigate to the Status panel.

Expected behavior
allBranchesLogCmds should not automatically include the default log command.

Version info:
commit=611fabde11d24d9acc71ee26077b9a1101f59f27, build date=2024-09-18T10:56:10Z, build source=binaryRelease, version=0.44.1, os=linux, arch=amd64, git version=2.43.0
git version 2.43.0

@MartinHammarstedt MartinHammarstedt added the bug Something isn't working label Oct 3, 2024
@ChrisMcD1
Copy link
Contributor

ChrisMcD1 commented Feb 26, 2025

I agree that these seems like a bug, and others seem to agree.

#3354 (comment)

I'm going to explore an auto-migration from allBranchesLogCmd to allBranchesLogCmds, and then we could have the element being undefined result in a list of length 1 on the current value.

@ChrisMcD1
Copy link
Contributor

Got a PR for this! ChrisMcD1#1.

It is in my fork, just because it is stacked off of #4318, and I don't believe that one can make stacked PRs across repositories. If so, GitHub is not making that possibility clear to me in the UI 😅

@ChrisMcD1 ChrisMcD1 linked a pull request Feb 28, 2025 that will close this issue
7 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants