Selaa lähdekoodia

Fixes opening changes for renamed files

main
Eric Amodio 1 vuosi sitten
vanhempi
commit
89b4f105d2
3 muutettua tiedostoa jossa 10 lisäystä ja 9 poistoa
  1. +1
    -0
      CHANGELOG.md
  2. +5
    -5
      src/git/actions/commit.ts
  3. +4
    -4
      src/webviews/commitDetails/commitDetailsWebview.ts

+ 1
- 0
CHANGELOG.md Näytä tiedosto

@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed
- Fixes [#2885](https://github.com/gitkraken/vscode-gitlens/issues/2885) - Folder History not show changed files of commit
- Fixes issues with opening changes (diffs) of renamed files
## [14.2.1] - 2023-08-10

+ 5
- 5
src/git/actions/commit.ts Näytä tiedosto

@ -236,14 +236,14 @@ export async function openChanges(
}
: commitOrRefs;
const uri1 = GitUri.fromFile(file, refs.repoPath);
const uri2 =
file.status === 'R' || file.status === 'C' ? GitUri.fromFile(file, refs.repoPath, refs.ref2, true) : uri1;
const rhsUri = GitUri.fromFile(file, refs.repoPath);
const lhsUri =
file.status === 'R' || file.status === 'C' ? GitUri.fromFile(file, refs.repoPath, refs.ref1, true) : rhsUri;
void (await executeCommand<DiffWithCommandArgs>(Commands.DiffWith, {
repoPath: refs.repoPath,
lhs: { uri: uri1, sha: refs.ref1 },
rhs: { uri: uri2, sha: refs.ref2 },
lhs: { uri: lhsUri, sha: refs.ref1 },
rhs: { uri: rhsUri, sha: refs.ref2 },
showOptions: options,
}));
}

+ 4
- 4
src/webviews/commitDetails/commitDetailsWebview.ts Näytä tiedosto

@ -903,7 +903,7 @@ export class CommitDetailsWebviewProvider implements WebviewProvider
const [commit, file] = result;
this.suspendLineTracker();
void openChangesWithWorking(file.path, commit, {
void openChangesWithWorking(file, commit, {
preserveFocus: true,
preview: true,
...this.getShowOptions(params),
@ -917,7 +917,7 @@ export class CommitDetailsWebviewProvider implements WebviewProvider
const [commit, file] = result;
this.suspendLineTracker();
void openChanges(file.path, commit, {
void openChanges(file, commit, {
preserveFocus: true,
preview: true,
...this.getShowOptions(params),
@ -932,7 +932,7 @@ export class CommitDetailsWebviewProvider implements WebviewProvider
const [commit, file] = result;
this.suspendLineTracker();
void openFile(file.path, commit, {
void openFile(file, commit, {
preserveFocus: true,
preview: true,
...this.getShowOptions(params),
@ -945,7 +945,7 @@ export class CommitDetailsWebviewProvider implements WebviewProvider
const [commit, file] = result;
void openFileOnRemote(file.path, commit);
void openFileOnRemote(file, commit);
}
private getShowOptions(params: FileActionParams): TextDocumentShowOptions | undefined {

Ladataan…
Peruuta
Tallenna