Browse Source

Fixes parsing of the last file commit's file

main
Eric Amodio 6 years ago
parent
commit
4629cda0d5
3 changed files with 5 additions and 2 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +1
    -1
      src/git/parsers/logParser.ts
  3. +3
    -1
      src/git/parsers/stashParser.ts

+ 1
- 0
CHANGELOG.md View File

@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed
- Fixes [#35](https://github.com/eamodio/vscode-gitlens/issues/35) - Copy Commit Sha to Clipboard not working (linux)
- Fixes issue where the last commit of a file history would be broken (failed to parse correctly)
## [8.0.0-beta3] - 2018-02-03
### Added

+ 1
- 1
src/git/parsers/logParser.ts View File

@ -41,7 +41,7 @@ export class GitLogParser {
let i = 0;
let first = true;
const lines = Strings.lines(data + '\n</f>');
const lines = Strings.lines(data + '</f>');
// Skip the first line since it will always be </f>
let next = lines.next();
if (next.done) return undefined;

+ 3
- 1
src/git/parsers/stashParser.ts View File

@ -17,7 +17,9 @@ const emptyEntry: StashEntry = {};
export class GitStashParser {
static parse(data: string, repoPath: string): GitStash | undefined {
const lines = Strings.lines(data + '\n</f>');
if (!data) return undefined;
const lines = Strings.lines(data + '</f>');
// Skip the first line since it will always be </f>
let next = lines.next();
if (next.done) return undefined;

Loading…
Cancel
Save