瀏覽代碼

Fixes #552 - comparing across renames wouldn't always work

main
Eric Amodio 6 年之前
父節點
當前提交
28034ced7a
共有 3 個檔案被更改,包括 8 行新增4 行删除
  1. +1
    -0
      CHANGELOG.md
  2. +1
    -1
      src/commands/diffLineWithWorking.ts
  3. +6
    -3
      src/git/parsers/blameParser.ts

+ 1
- 0
CHANGELOG.md 查看文件

@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Fixes an issue where gravatar icons would sometimes not show up — thanks to [PR #579](https://github.com/eamodio/vscode-gitlens/pull/579) by sgtwilko ([@sgtwilko](https://github.com/sgtwilko))
- Fixes [#501](https://github.com/eamodio/vscode-gitlens/issues/501) — Azure DevOps ssh remotes aren't handled properly
- Fixes [#552](https://github.com/eamodio/vscode-gitlens/issues/552) — "Open Line Changes with..." doesn't work for renamed files
- Fixes [#566](https://github.com/eamodio/vscode-gitlens/issues/566) — History error with UNC
- Fixes [#572](https://github.com/eamodio/vscode-gitlens/issues/572) — Explorer cant expand some branch folders
- Fixes an issue where comparing a file with its staged revision doesn't show any content

+ 1
- 1
src/commands/diffLineWithWorking.ts 查看文件

@ -76,7 +76,7 @@ export class DiffLineWithWorkingCommand extends ActiveEditorCommand {
},
rhs: {
sha: '',
uri: args.commit.uri
uri: args.commit.workingUri
},
line: args.line,
showOptions: args.showOptions

+ 6
- 3
src/git/parsers/blameParser.ts 查看文件

@ -125,6 +125,9 @@ export class GitBlameParser {
);
relativeFileName = Strings.normalizePath(paths.relative(repoPath, fileName));
}
else {
relativeFileName = entry.fileName!;
}
first = false;
GitBlameParser.parseEntry(entry, repoPath, relativeFileName, commits, authors, lines, currentUser);
@ -159,7 +162,7 @@ export class GitBlameParser {
private static parseEntry(
entry: BlameEntry,
repoPath: string | undefined,
fileName: string | undefined,
relativeFileName: string,
commits: Map<string, GitBlameCommit>,
authors: Map<string, GitAuthor>,
lines: GitCommitLine[],
@ -197,8 +200,8 @@ export class GitBlameParser {
entry.authorEmail,
new Date((entry.authorDate as any) * 1000),
entry.summary!,
fileName!,
fileName !== entry.fileName ? entry.fileName : undefined,
relativeFileName,
relativeFileName !== entry.fileName ? entry.fileName : undefined,
entry.previousSha,
entry.previousSha && entry.previousFileName,
[]

Loading…
取消
儲存