Browse Source

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

main
Eric Amodio 6 years ago
parent
commit
28034ced7a
3 changed files with 8 additions and 4 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +1
    -1
      src/commands/diffLineWithWorking.ts
  3. +6
    -3
      src/git/parsers/blameParser.ts

+ 1
- 0
CHANGELOG.md View File

@ -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 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 [#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 [#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 [#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 - Fixes an issue where comparing a file with its staged revision doesn't show any content

+ 1
- 1
src/commands/diffLineWithWorking.ts View File

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

+ 6
- 3
src/git/parsers/blameParser.ts View File

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

Loading…
Cancel
Save