瀏覽代碼

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

main
Eric Amodio 6 年之前
父節點
當前提交
353934c675
共有 2 個檔案被更改,包括 6 行新增7 行删除
  1. +2
    -2
      src/git/parsers/logParser.ts
  2. +4
    -5
      src/git/parsers/stashParser.ts

+ 2
- 2
src/git/parsers/logParser.ts 查看文件

@ -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);
}
break;

+ 4
- 5
src/git/parsers/stashParser.ts 查看文件

@ -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);
}
break;
@ -114,9 +114,8 @@ export class GitStashParser {
}
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(', ');
}
}

Loading…
取消
儲存