From 9a2ad33ddbdb28093e54738802a4c0fcefd08b19 Mon Sep 17 00:00:00 2001 From: Nafiur Rahman Khadem Date: Thu, 4 Aug 2022 21:53:35 +0600 Subject: [PATCH] Fixes #1549 fetch for different upstream branch --- CHANGELOG.md | 1 + src/env/node/git/git.ts | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 912a27d..b79d93b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ### Fixed +- Fixes [#1549](https://github.com/gitkraken/vscode-gitlens/issues/1549) - Fetch does not work when local branch name differs from remote branch name - Fixes [#2292](https://github.com/gitkraken/vscode-gitlens/issues/2292) - Push button in BranchTrackingStatusNode of non-current branch does not trigger "Push force" - Fixes [#1488](https://github.com/gitkraken/vscode-gitlens/issues/1488) - Open Folder History not working with non-English language pack - Fixes [#2303](https://github.com/gitkraken/vscode-gitlens/issues/2303) - "Googlesource" gerrit only supports two levels of domain — thanks to [PR #2304](https://github.com/gitkraken/vscode-gitlens/pull/2304) by Matt Buckley ([@Mattadore](https://github.com/Mattadore)) diff --git a/src/env/node/git/git.ts b/src/env/node/git/git.ts index 84c62f5..d7b7679 100644 --- a/src/env/node/git/git.ts +++ b/src/env/node/git/git.ts @@ -757,7 +757,12 @@ export class Git { throw ex; } } else { - params.push(options.remote, options.branch); + params.push( + options.remote, + options.upstream + ? `${options.upstream}:refs/remotes/${options.remote}/${options.branch}` + : options.branch, + ); } } else if (options.remote) { params.push(options.remote);