Kaynağa Gözat

Fixes opening changes for renamed files

main
Eric Amodio 1 yıl önce
ebeveyn
işleme
89b4f105d2
3 değiştirilmiş dosya ile 10 ekleme ve 9 silme
  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 Dosyayı Görüntüle

@ -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 Dosyayı Görüntüle

@ -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 Dosyayı Görüntüle

@ -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 {

Yükleniyor…
İptal
Kaydet