Skip to content

Commit 923ad83

Browse files
authored
force tryFetch (#1189)
1 parent f094b77 commit 923ad83

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

dist/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ exports.getWorkingBaseAndType = getWorkingBaseAndType;
6262
function tryFetch(git, remote, branch) {
6363
return __awaiter(this, void 0, void 0, function* () {
6464
try {
65-
yield git.fetch([`${branch}:refs/remotes/${remote}/${branch}`], remote);
65+
yield git.fetch([`${branch}:refs/remotes/${remote}/${branch}`], remote, [
66+
'--force'
67+
]);
6668
return true;
6769
}
6870
catch (_a) {

src/create-or-update-branch.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ export async function tryFetch(
3333
branch: string
3434
): Promise<boolean> {
3535
try {
36-
await git.fetch([`${branch}:refs/remotes/${remote}/${branch}`], remote)
36+
await git.fetch([`${branch}:refs/remotes/${remote}/${branch}`], remote, [
37+
'--force'
38+
])
3739
return true
3840
} catch {
3941
return false

0 commit comments

Comments
 (0)