blame: add blame.rename* configuration#894
Merged
dscho merged 1 commit intomicrosoft:vfs-2.53.0from Apr 22, 2026
Merged
Conversation
dscho
reviewed
Apr 21, 2026
3719f55 to
1f227c2
Compare
1f227c2 to
2f2b9df
Compare
derrickstolee
approved these changes
Apr 21, 2026
derrickstolee
left a comment
There was a problem hiding this comment.
Looks good. I think you need to update your PR description to match the latest changes.
Also, this seems like something that should go upstream eventually. It's good to fast-track to microsoft/git, but just keep in mind that the config key names may need to change during the upstream review.
Add blame-specific configuration options for rename detection: - blame.renames: disable rename following (defaults to true) - blame.renameThreshold: minimum similarity for rename detection - blame.renameLimit: limit on rename detection candidates These are independent of the diff.renames/renameThreshold/renameLimit settings, which blame does not read because its config callback chains to git_default_config rather than git_diff_basic_config. The threshold and limit options forward to git_diff_basic_config to set the same globals that repo_diff_setup() copies into diff_options, following the existing pattern used for diff.algorithm. Also move diff.renameThreshold from git_diff_ui_config to git_diff_basic_config, alongside the related diff.renameLimit, since it controls rename detection behavior rather than UI presentation. Assisted-by: Claude Opus 4.6 Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
2f2b9df to
92725e7
Compare
derrickstolee
approved these changes
Apr 21, 2026
dscho
approved these changes
Apr 22, 2026
Member
dscho
left a comment
There was a problem hiding this comment.
Let's merge this! Thank you for your swift fix!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
blame's config callback did not load diff.renameThreshold because it chained directly to git_default_config, skipping git_diff_basic_config (and git_diff_ui_config) where that setting is handled. As a result, repo_diff_setup() always saw a zero rename_score, and blame fell back to DEFAULT_RENAME_SCORE (50%) regardless of the configured threshold.
This PR moves diff.renameThreshold from git_diff_ui_config to git_diff_basic_config, alongside the related diff.renameLimit setting, so that plumbing commands that use git_diff_basic_config can also pick it up - but instead of trying to import that for blame, this PR adds separate configuration for blame.renames, blame.renameThreshold, and blame.renameLimit
Assisted-by: Claude Opus 4.6