Skip to content

Git - use diff instead of diff-tree for showing commit data and comparing branches#273969

Merged
lszomoru merged 2 commits intomainfrom
lszomoru/wittering-spider
Oct 29, 2025
Merged

Git - use diff instead of diff-tree for showing commit data and comparing branches#273969
lszomoru merged 2 commits intomainfrom
lszomoru/wittering-spider

Conversation

@lszomoru
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings October 29, 2025 14:38
@lszomoru lszomoru enabled auto-merge (squash) October 29, 2025 14:38
@lszomoru lszomoru self-assigned this Oct 29, 2025
@lszomoru lszomoru added the scm General SCM compound issues label Oct 29, 2025
@lszomoru lszomoru added this to the October 2025 milestone Oct 29, 2025
@lszomoru lszomoru changed the title Git - use git diff instead of diff-tree for showing commit data and comparing branches Git - use diff instead of diff-tree for showing commit data and comparing branches Oct 29, 2025
DonJayamanne
DonJayamanne previously approved these changes Oct 29, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the Git extension's diff operations by consolidating diffTrees into diffBetween and standardizing the parameter patterns across diff methods. The refactoring introduces an options object pattern to diffBetween for better extensibility and removes the now-redundant diffTrees and diffBetweenShortStat methods.

Key changes:

  • Replaced diffTrees with diffBetween across all call sites
  • Converted diffBetween in git.ts to use an options object with path, similarityThreshold, and symmetric parameters
  • Refactored diffFiles to accept an options object instead of positional boolean parameters
  • Updated all internal diff method calls to use the new options-based signature

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
extensions/git/src/git.ts Refactored diffBetween to use options object, removed diffTrees and diffBetweenShortStat, updated diffFiles signature to use options
extensions/git/src/repository.ts Updated diffBetween wrapper to pass options object with similarityThreshold configuration to underlying implementation, removed diffTrees and diffBetweenShortStat wrappers
extensions/git/src/historyProvider.ts Changed diffTrees call to diffBetween
extensions/git/src/commands.ts Changed all diffTrees calls to diffBetween

@lszomoru lszomoru disabled auto-merge October 29, 2025 14:50
@lszomoru lszomoru merged commit 20ded57 into main Oct 29, 2025
28 checks passed
@lszomoru lszomoru deleted the lszomoru/wittering-spider branch October 29, 2025 15:28
dmitrivMS pushed a commit that referenced this pull request Oct 29, 2025
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Dec 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

scm General SCM compound issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants