Skip to content

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
sync/vfs-2.54.0
Open

Synchronize vfs-2.54.0 with vfs-2.53.0 (git blame changes)#896
dscho wants to merge 3 commits intovfs-2.54.0from
sync/vfs-2.54.0

Conversation

@dscho
Copy link
Copy Markdown
Member

@dscho dscho commented Apr 22, 2026

This ports the changes from #894 from the vfs-2.53.0 release train to the vfs-2.54.0 release train.

dscho and others added 3 commits April 22, 2026 17:30
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
@dscho dscho requested a review from mjcheetham April 22, 2026 15:35
@dscho dscho self-assigned this Apr 22, 2026
@dscho dscho changed the title Sync/vfs 2.54.0 Synchronize vfs-2.54.0 with vfs-2.53.0 (git blame changes) Apr 22, 2026
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.

2 participants