Browse Source

Fixes #2473 last fetched date is wrong

main
Eric Amodio 1 year ago
parent
commit
cfedc852d4
2 changed files with 5 additions and 3 deletions
  1. +4
    -0
      CHANGELOG.md
  2. +1
    -3
      src/env/node/git/localGitProvider.ts

+ 4
- 0
CHANGELOG.md View File

@ -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 View File

@ -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…
Cancel
Save