diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a4e880..ffac22b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ### Fixed +- Fixes [#862](https://github.com/eamodio/vscode-gitlens/issues/862) - Command failed when expanding a local branch +- Fixes [#860](https://github.com/eamodio/vscode-gitlens/issues/860) - Unknown date format error - Fixes [#858](https://github.com/eamodio/vscode-gitlens/issues/858) - GitHub avatars in blame line hovers are huge - Fixes issue with locating a working file when the file is staged or modified diff --git a/src/git/git.ts b/src/git/git.ts index 30b90b3..1a9e74e 100644 --- a/src/git/git.ts +++ b/src/git/git.ts @@ -870,7 +870,7 @@ export class Git { repoPath: string, { all, branch, since }: { all?: boolean; branch?: string; since?: string } = {} ): Promise { - const params = ['log', '-g', `--format=${GitReflogParser.defaultFormat}`, '--date=unix']; + const params = ['log', '-g', `--format=${GitReflogParser.defaultFormat}`, '--date=iso8601']; if (all) { params.push('--all'); } diff --git a/src/git/parsers/branchParser.ts b/src/git/parsers/branchParser.ts index 32b4873..79946fd 100644 --- a/src/git/parsers/branchParser.ts +++ b/src/git/parsers/branchParser.ts @@ -15,7 +15,7 @@ export class GitBranchParser { `${lb}u${rb}%(upstream:short)`, // branch upstream `${lb}t${rb}%(upstream:track)`, // branch upstream tracking state `${lb}r${rb}%(objectname)`, // ref - `${lb}d${rb}%(committerdate:unix)` // committer date + `${lb}d${rb}%(committerdate:iso8601)` // committer date ].join(''); @debug({ args: false, singleLine: true }) @@ -57,7 +57,7 @@ export class GitBranchParser { name, remote, current.charCodeAt(0) === 42, // '*', - new Date(Number(date) * 1000), + new Date(date), // Stops excessive memory usage -- https://bugs.chromium.org/p/v8/issues/detail?id=2869 ref == null || ref.length === 0 ? undefined : ` ${ref}`.substr(1), // Stops excessive memory usage -- https://bugs.chromium.org/p/v8/issues/detail?id=2869 diff --git a/src/git/parsers/reflogParser.ts b/src/git/parsers/reflogParser.ts index 48350a8..23cee3f 100644 --- a/src/git/parsers/reflogParser.ts +++ b/src/git/parsers/reflogParser.ts @@ -13,7 +13,7 @@ const rb = '%x3e'; // `%x${'>'.charCodeAt(0).toString(16)}`; export class GitReflogParser { static defaultFormat = [ `${lb}r${rb}%H`, // ref - `${lb}d${rb}%gD`, // reflog selector (with UNIX timestamp) + `${lb}d${rb}%gD`, // reflog selector (with iso8601 timestamp) `${lb}s${rb}%gs` // reflog subject // `${lb}n${rb}%D` // ref names ].join(''); @@ -95,7 +95,7 @@ export class GitReflogParser { ` ${sha}`.substr(1), // Stops excessive memory usage -- https://bugs.chromium.org/p/v8/issues/detail?id=2869 ` ${selector}`.substr(1), - new Date(Number(date) * 1000), + new Date(date), // Stops excessive memory usage -- https://bugs.chromium.org/p/v8/issues/detail?id=2869 ` ${command}`.substr(1), // Stops excessive memory usage -- https://bugs.chromium.org/p/v8/issues/detail?id=2869