blame: teach git_blame_config about diff.renameThreshold#894
Draft
tyrielv wants to merge 1 commit intomicrosoft:vfs-2.53.0from
Draft
blame: teach git_blame_config about diff.renameThreshold#894tyrielv wants to merge 1 commit intomicrosoft:vfs-2.53.0from
tyrielv wants to merge 1 commit intomicrosoft:vfs-2.53.0from
Conversation
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. Fix this by forwarding diff.renamethreshold to git_diff_basic_config, 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 setting, so that plumbing commands that use git_diff_basic_config can also pick it up. Signed-off-by: Tyrie Vella <tyrielv@gmail.com> Assisted-by: Claude Opus 4.6
dscho
reviewed
Apr 21, 2026
| return 0; | ||
| } | ||
|
|
||
| if (!strcmp(var, "diff.renamethreshold")) |
Member
There was a problem hiding this comment.
Hmm. I do not see any diff.renames prior art in this file. Is it possible that diff.renames is not heeded by git blame? If so, it would probably make more sense to add blame.rename* config settings for all three of these diff.rename* settings.
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.
Fix this by forwarding diff.renamethreshold to git_diff_basic_config, 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 setting, so that plumbing commands that use git_diff_basic_config can also pick it up.
Assisted-by: Claude Opus 4.6