Skip to content

Commit 1ec4945

Browse files
committed
Fixes behind status files
1 parent 178226b commit 1ec4945

File tree

2 files changed

+26
-18
lines changed

2 files changed

+26
-18
lines changed

CHANGELOG.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1818

1919
### Fixed
2020

21-
- Fixes [1423](https://github.com/eamodio/vscode-gitlens/issues/1423) - Create tag with message fails
22-
- Fixes [1428](https://github.com/eamodio/vscode-gitlens/issues/1428) - Incorrect branch name when no commits exist on new repo
23-
- 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
24-
- Fixes [1448](https://github.com/eamodio/vscode-gitlens/issues/1448) - Hashes (#) are percent encoded in custom remote urls
25-
- Fixes [1447](https://github.com/eamodio/vscode-gitlens/issues/1447) - _Open File on Remote From..._ is missing remote branches
26-
- Fixes [1442](https://github.com/eamodio/vscode-gitlens/issues/1442) - Interactive Rebase Editor not opened but plain text file when called from terminal
27-
- 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))
28-
- Fixes [1445](https://github.com/eamodio/vscode-gitlens/issues/1439) - Improve documentation for hiding default added editor actions
29-
- Fixes [1411](https://github.com/eamodio/vscode-gitlens/issues/1411) - Click on branch compare node does not expand the tree
21+
- Fixes [#1423](https://github.com/eamodio/vscode-gitlens/issues/1423) - Create tag with message fails
22+
- Fixes [#1428](https://github.com/eamodio/vscode-gitlens/issues/1428) - Incorrect branch name when no commits exist on new repo
23+
- 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
24+
- Fixes [#1448](https://github.com/eamodio/vscode-gitlens/issues/1448) - Hashes (#) are percent encoded in custom remote urls
25+
- Fixes [#1447](https://github.com/eamodio/vscode-gitlens/issues/1447) - _Open File on Remote From..._ is missing remote branches
26+
- Fixes [#1442](https://github.com/eamodio/vscode-gitlens/issues/1442) - Interactive Rebase Editor not opened but plain text file when called from terminal
27+
- 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))
28+
- Fixes [#1445](https://github.com/eamodio/vscode-gitlens/issues/1439) - Improve documentation for hiding default added editor actions
29+
- Fixes [#1411](https://github.com/eamodio/vscode-gitlens/issues/1411) - Click on branch compare node does not expand the tree
30+
- Fixes an issue where the _Changes to pull from \*_'s _\* files changed_ was always 0
3031

3132
## [11.3.0] - 2021-03-05
3233

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

7273
### Fixed
7374

74-
- Fixes [1438](https://github.com/eamodio/vscode-gitlens/issues/1438) - Messages in hovers wrong encoding using non UTF-8
75-
- Fixes [1372](https://github.com/eamodio/vscode-gitlens/issues/1372) - Unexpected repository detection on editor startup after recent updates
76-
- Fixes [1394](https://github.com/eamodio/vscode-gitlens/issues/1394) - Repository view settings appear disabled
77-
- Fixes [1391](https://github.com/eamodio/vscode-gitlens/issues/1391) - Branch names are not properly escaped in git commands
78-
- 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)
79-
- Fixes [1363](https://github.com/eamodio/vscode-gitlens/issues/1363) - Error 'Unable to open compare', when git setting log.showsignature is active
80-
- Fixes [1368](https://github.com/eamodio/vscode-gitlens/issues/1368) - Suppress message "GitLens was unable to find Git"
75+
- Fixes [#1438](https://github.com/eamodio/vscode-gitlens/issues/1438) - Messages in hovers wrong encoding using non UTF-8
76+
- Fixes [#1372](https://github.com/eamodio/vscode-gitlens/issues/1372) - Unexpected repository detection on editor startup after recent updates
77+
- Fixes [#1394](https://github.com/eamodio/vscode-gitlens/issues/1394) - Repository view settings appear disabled
78+
- Fixes [#1391](https://github.com/eamodio/vscode-gitlens/issues/1391) - Branch names are not properly escaped in git commands
79+
- 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)
80+
- Fixes [#1363](https://github.com/eamodio/vscode-gitlens/issues/1363) - Error 'Unable to open compare', when git setting log.showsignature is active
81+
- Fixes [#1368](https://github.com/eamodio/vscode-gitlens/issues/1368) - Suppress message "GitLens was unable to find Git"
8182
- Fixes an issue where the rebase status in the views could get "stuck" after a rebase completed
8283
- Fixes typo in README — thanks to [PR #1374](https://github.com/eamodio/vscode-gitlens/pull/1374) by David Rees ([@studgeek](https://github.com/studgeek))
8384

src/views/nodes/branchTrackingStatusFilesNode.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ export class BranchTrackingStatusFilesNode extends ViewNode<ViewsWithCommits> {
4747
async getChildren(): Promise<ViewNode[]> {
4848
const log = await Container.git.getLog(this.repoPath, {
4949
limit: 0,
50-
ref: GitRevision.createRange(this.status.upstream, this.branch.ref),
50+
ref: GitRevision.createRange(
51+
this.status.upstream,
52+
this.branch.ref,
53+
this.direction === 'behind' ? '...' : '..',
54+
),
5155
});
5256

5357
const files =
@@ -102,7 +106,10 @@ export class BranchTrackingStatusFilesNode extends ViewNode<ViewsWithCommits> {
102106
}
103107

104108
async getTreeItem(): Promise<TreeItem> {
105-
const stats = await Container.git.getChangedFilesCount(this.repoPath, `${this.status.upstream}...`);
109+
const stats = await Container.git.getChangedFilesCount(
110+
this.repoPath,
111+
`${this.status.upstream}${this.direction === 'behind' ? '..' : '...'}`,
112+
);
106113
const files = stats?.files ?? 0;
107114

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

0 commit comments

Comments
 (0)