Skip to content

Commit

Permalink
force tryFetch (#1189)
Browse files Browse the repository at this point in the history
  • Loading branch information
leeopop committed Jun 3, 2022
1 parent f094b77 commit 923ad83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dist/index.js
Expand Up @@ -62,7 +62,9 @@ exports.getWorkingBaseAndType = getWorkingBaseAndType;
function tryFetch(git, remote, branch) {
return __awaiter(this, void 0, void 0, function* () {
try {
yield git.fetch([`${branch}:refs/remotes/${remote}/${branch}`], remote);
yield git.fetch([`${branch}:refs/remotes/${remote}/${branch}`], remote, [
'--force'
]);
return true;
}
catch (_a) {
Expand Down
4 changes: 3 additions & 1 deletion src/create-or-update-branch.ts
Expand Up @@ -33,7 +33,9 @@ export async function tryFetch(
branch: string
): Promise<boolean> {
try {
await git.fetch([`${branch}:refs/remotes/${remote}/${branch}`], remote)
await git.fetch([`${branch}:refs/remotes/${remote}/${branch}`], remote, [
'--force'
])
return true
} catch {
return false
Expand Down

0 comments on commit 923ad83

Please sign in to comment.