Skip to content

Migrate deprecated AllBranchesLogCmd to AllBranchesLogCmds #4345

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChrisMcD1
Copy link
Contributor

@ChrisMcD1 ChrisMcD1 commented Feb 28, 2025

  • PR Description

Fixes #3961

Their issue where the default allBranchesLogCmd default remains present is because we just do a lo.Uniq(lo.WithoutEmpty()) on the combined list of allBranchesLogCmd and allBranchesLogCmds.

At the point of this code, it is not possible to tell whether the value present in allBranchesLogCmd is user-provided or not. We have already merged the config with the default config, so the user not setting anything, and the user explicitly setting "Yes, I want the default", are indistinguishable.

Based on that bug report, I'm assuming that users that have not set anything for allBranchesLogCmd, but have set something for allBranchesLogCmds, just want the list they have specified in the plural version. Some users have likely figured out they can explicitly set allBranchesLogCmd: "" to get this behavior, but most would not.

To achieve this desired behavior, I figure it is easiest to just migrate all user config to allBranchesLogCmds. If they have explicitly set a non-empty value in allBranchesLogCmd, it will be pulled over. If they set an empty string, it will be excluded.

  • Please check if the PR fulfills these requirements
  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@ChrisMcD1 ChrisMcD1 marked this pull request as ready for review February 28, 2025 22:31
@ChrisMcD1 ChrisMcD1 force-pushed the 3961-all-branches-log branch from 1ce80ef to aefa6e5 Compare February 28, 2025 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allBranchesLogCmds always includes default log command
1 participant