Skip to content

Commit

Permalink
Fixes behind status files
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Apr 7, 2021
1 parent 178226b commit 1ec4945
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
33 changes: 17 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

### Fixed

- Fixes [1423](https://github.com/eamodio/vscode-gitlens/issues/1423) - Create tag with message fails
- Fixes [1428](https://github.com/eamodio/vscode-gitlens/issues/1428) - Incorrect branch name when no commits exist on new repo
- Fixes [1444](https://github.com/eamodio/vscode-gitlens/issues/1444) - File history view "Open Changes with Working File" does not work for the very first commit
- Fixes [1448](https://github.com/eamodio/vscode-gitlens/issues/1448) - Hashes (#) are percent encoded in custom remote urls
- Fixes [1447](https://github.com/eamodio/vscode-gitlens/issues/1447) - _Open File on Remote From..._ is missing remote branches
- Fixes [1442](https://github.com/eamodio/vscode-gitlens/issues/1442) - Interactive Rebase Editor not opened but plain text file when called from terminal
- Fixes [1439](https://github.com/eamodio/vscode-gitlens/issues/1439) - Copying a remote file URL for a file on Azure DevOps does not work — thanks to [PR #1440](https://github.com/eamodio/vscode-gitlens/pull/1440) by Lee C. ([MeltingMosaic](https://github.com/MeltingMosaic))
- Fixes [1445](https://github.com/eamodio/vscode-gitlens/issues/1439) - Improve documentation for hiding default added editor actions
- Fixes [1411](https://github.com/eamodio/vscode-gitlens/issues/1411) - Click on branch compare node does not expand the tree
- Fixes [#1423](https://github.com/eamodio/vscode-gitlens/issues/1423) - Create tag with message fails
- Fixes [#1428](https://github.com/eamodio/vscode-gitlens/issues/1428) - Incorrect branch name when no commits exist on new repo
- Fixes [#1444](https://github.com/eamodio/vscode-gitlens/issues/1444) - File history view "Open Changes with Working File" does not work for the very first commit
- Fixes [#1448](https://github.com/eamodio/vscode-gitlens/issues/1448) - Hashes (#) are percent encoded in custom remote urls
- Fixes [#1447](https://github.com/eamodio/vscode-gitlens/issues/1447) - _Open File on Remote From..._ is missing remote branches
- Fixes [#1442](https://github.com/eamodio/vscode-gitlens/issues/1442) - Interactive Rebase Editor not opened but plain text file when called from terminal
- Fixes [#1439](https://github.com/eamodio/vscode-gitlens/issues/1439) - Copying a remote file URL for a file on Azure DevOps does not work — thanks to [PR #1440](https://github.com/eamodio/vscode-gitlens/pull/1440) by Lee C. ([MeltingMosaic](https://github.com/MeltingMosaic))
- Fixes [#1445](https://github.com/eamodio/vscode-gitlens/issues/1439) - Improve documentation for hiding default added editor actions
- Fixes [#1411](https://github.com/eamodio/vscode-gitlens/issues/1411) - Click on branch compare node does not expand the tree
- Fixes an issue where the _Changes to pull from \*_'s _\* files changed_ was always 0

## [11.3.0] - 2021-03-05

Expand Down Expand Up @@ -71,13 +72,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

### Fixed

- Fixes [1438](https://github.com/eamodio/vscode-gitlens/issues/1438) - Messages in hovers wrong encoding using non UTF-8
- Fixes [1372](https://github.com/eamodio/vscode-gitlens/issues/1372) - Unexpected repository detection on editor startup after recent updates
- Fixes [1394](https://github.com/eamodio/vscode-gitlens/issues/1394) - Repository view settings appear disabled
- Fixes [1391](https://github.com/eamodio/vscode-gitlens/issues/1391) - Branch names are not properly escaped in git commands
- Fixes [1336](https://github.com/eamodio/vscode-gitlens/issues/1336) - Need to allow GitLens to connect to GitHub in every Codespace (requires VS Code v1.54-insiders or later)
- Fixes [1363](https://github.com/eamodio/vscode-gitlens/issues/1363) - Error 'Unable to open compare', when git setting log.showsignature is active
- Fixes [1368](https://github.com/eamodio/vscode-gitlens/issues/1368) - Suppress message "GitLens was unable to find Git"
- Fixes [#1438](https://github.com/eamodio/vscode-gitlens/issues/1438) - Messages in hovers wrong encoding using non UTF-8
- Fixes [#1372](https://github.com/eamodio/vscode-gitlens/issues/1372) - Unexpected repository detection on editor startup after recent updates
- Fixes [#1394](https://github.com/eamodio/vscode-gitlens/issues/1394) - Repository view settings appear disabled
- Fixes [#1391](https://github.com/eamodio/vscode-gitlens/issues/1391) - Branch names are not properly escaped in git commands
- Fixes [#1336](https://github.com/eamodio/vscode-gitlens/issues/1336) - Need to allow GitLens to connect to GitHub in every Codespace (requires VS Code v1.54-insiders or later)
- Fixes [#1363](https://github.com/eamodio/vscode-gitlens/issues/1363) - Error 'Unable to open compare', when git setting log.showsignature is active
- Fixes [#1368](https://github.com/eamodio/vscode-gitlens/issues/1368) - Suppress message "GitLens was unable to find Git"
- Fixes an issue where the rebase status in the views could get "stuck" after a rebase completed
- Fixes typo in README — thanks to [PR #1374](https://github.com/eamodio/vscode-gitlens/pull/1374) by David Rees ([@studgeek](https://github.com/studgeek))

Expand Down
11 changes: 9 additions & 2 deletions src/views/nodes/branchTrackingStatusFilesNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ export class BranchTrackingStatusFilesNode extends ViewNode<ViewsWithCommits> {
async getChildren(): Promise<ViewNode[]> {
const log = await Container.git.getLog(this.repoPath, {
limit: 0,
ref: GitRevision.createRange(this.status.upstream, this.branch.ref),
ref: GitRevision.createRange(
this.status.upstream,
this.branch.ref,
this.direction === 'behind' ? '...' : '..',
),
});

const files =
Expand Down Expand Up @@ -102,7 +106,10 @@ export class BranchTrackingStatusFilesNode extends ViewNode<ViewsWithCommits> {
}

async getTreeItem(): Promise<TreeItem> {
const stats = await Container.git.getChangedFilesCount(this.repoPath, `${this.status.upstream}...`);
const stats = await Container.git.getChangedFilesCount(
this.repoPath,
`${this.status.upstream}${this.direction === 'behind' ? '..' : '...'}`,
);
const files = stats?.files ?? 0;

const label = `${Strings.pluralize('file', files)} changed`;
Expand Down

0 comments on commit 1ec4945

Please sign in to comment.