Browse Source

Fixes #544 - stop sometimes clipping the last char of a log message

main
Eric Amodio 6 years ago
parent
commit
353934c675
2 changed files with 6 additions and 7 deletions
  1. +2
    -2
      src/git/parsers/logParser.ts
  2. +4
    -5
      src/git/parsers/stashParser.ts

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

@ -124,8 +124,8 @@ export class GitLogParser {
} }
} }
if (entry.summary !== undefined) {
// Remove the trailing newline
// Remove the trailing newline
if (entry.summary != null && entry.summary.charCodeAt(entry.summary.length - 1) === 10) {
entry.summary = entry.summary.slice(0, -1); entry.summary = entry.summary.slice(0, -1);
} }
break; break;

+ 4
- 5
src/git/parsers/stashParser.ts View File

@ -79,8 +79,8 @@ export class GitStashParser {
} }
} }
if (entry.summary !== undefined) {
// Remove the trailing newline
// Remove the trailing newline
if (entry.summary != null && entry.summary.charCodeAt(entry.summary.length - 1) === 10) {
entry.summary = entry.summary.slice(0, -1); entry.summary = entry.summary.slice(0, -1);
} }
break; break;
@ -114,9 +114,8 @@ export class GitStashParser {
} }
if (entry.files !== undefined) { if (entry.files !== undefined) {
entry.fileNames = Arrays.filterMap(
entry.files,
f => (f.fileName ? f.fileName : undefined)
entry.fileNames = Arrays.filterMap(entry.files, f =>
f.fileName ? f.fileName : undefined
).join(', '); ).join(', ');
} }
} }

Loading…
Cancel
Save