瀏覽代碼

Fixes #2473 last fetched date is wrong

main
Eric Amodio 1 年之前
父節點
當前提交
cfedc852d4
共有 2 個文件被更改,包括 5 次插入3 次删除
  1. +4
    -0
      CHANGELOG.md
  2. +1
    -3
      src/env/node/git/localGitProvider.ts

+ 4
- 0
CHANGELOG.md 查看文件

@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Adds a new experimental minimap of commit activity to the _Commit Graph_
### Fixed
- Fixes [#2473](https://github.com/gitkraken/vscode-gitlens/issues/2473) - Commit graph status bar show wrong last fetched date
## [13.2.0] - 2022-12-20
### Added

+ 1
- 3
src/env/node/git/localGitProvider.ts 查看文件

@ -2524,9 +2524,7 @@ export class LocalGitProvider implements GitProvider, Disposable {
async getLastFetchedTimestamp(repoPath: string): Promise<number | undefined> {
try {
const gitDir = await this.getGitDir(repoPath);
const stats = await workspace.fs.stat(
this.container.git.getAbsoluteUri(Uri.joinPath(gitDir.commonUri ?? gitDir.uri, 'FETCH_HEAD'), repoPath),
);
const stats = await workspace.fs.stat(Uri.joinPath(gitDir.uri, 'FETCH_HEAD'));
// If the file is empty, assume the fetch failed, and don't update the timestamp
if (stats.size > 0) return stats.mtime;
} catch {}

Loading…
取消
儲存