Synchronize vfs-2.54.0 with vfs-2.53.0 (git blame changes)#896
Open
dscho wants to merge 3 commits intovfs-2.54.0from
Open
Synchronize vfs-2.54.0 with vfs-2.53.0 (git blame changes)#896dscho wants to merge 3 commits intovfs-2.54.0from
vfs-2.54.0 with vfs-2.53.0 (git blame changes)#896dscho wants to merge 3 commits intovfs-2.54.0from
Conversation
diff: add renameThreshold configuration option Add diff.renameThreshold, merge.renameThreshold, and status.renameThreshold configuration options to control the minimum similarity threshold for rename detection without requiring command-line flags. The cascade follows the existing pattern for renameLimit and renames: - merge.renameThreshold overrides diff.renameThreshold for merges - status.renameThreshold overrides diff.renameThreshold for status - CLI flags (-M, --find-renames) override all config values The value accepts the same format as -M: a percentage (e.g. 50%) or a fraction (e.g. 0.5). If unset, the default remains 50%. Assisted-by: Claude Opus 4.6 Signed-off-by: Tyrie Vella <tyrielv@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
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
vfs-2.54.0 with vfs-2.53.0 (git blame changes)
derrickstolee
approved these changes
Apr 22, 2026
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.
This ports the changes from #894 from the
vfs-2.53.0release train to thevfs-2.54.0release train.