force tryFetch (#1189)
This commit is contained in:
parent
f094b77505
commit
923ad837f1
2 changed files with 6 additions and 2 deletions
4
dist/index.js
vendored
4
dist/index.js
vendored
|
@ -62,7 +62,9 @@ exports.getWorkingBaseAndType = getWorkingBaseAndType;
|
||||||
function tryFetch(git, remote, branch) {
|
function tryFetch(git, remote, branch) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
yield git.fetch([`${branch}:refs/remotes/${remote}/${branch}`], remote);
|
yield git.fetch([`${branch}:refs/remotes/${remote}/${branch}`], remote, [
|
||||||
|
'--force'
|
||||||
|
]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (_a) {
|
catch (_a) {
|
||||||
|
|
|
@ -33,7 +33,9 @@ export async function tryFetch(
|
||||||
branch: string
|
branch: string
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
await git.fetch([`${branch}:refs/remotes/${remote}/${branch}`], remote)
|
await git.fetch([`${branch}:refs/remotes/${remote}/${branch}`], remote, [
|
||||||
|
'--force'
|
||||||
|
])
|
||||||
return true
|
return true
|
||||||
} catch {
|
} catch {
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in a new issue