Migrate deprecated AllBranchesLogCmd to AllBranchesLogCmds #4345
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3961
Their issue where the default
allBranchesLogCmd
default remains present is because we just do alo.Uniq(lo.WithoutEmpty())
on the combined list ofallBranchesLogCmd
andallBranchesLogCmds
.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 forallBranchesLogCmds
, just want the list they have specified in the plural version. Some users have likely figured out they can explicitly setallBranchesLogCmd: ""
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 inallBranchesLogCmd
, it will be pulled over. If they set an empty string, it will be excluded.go generate ./...
)