Skip to content

Commit

Permalink
fix(git)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed Jan 13, 2024
1 parent 6466fd9 commit 4cc8a6e
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/lib/adapters/Git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,25 @@ export default class GitAdapter extends CachingAdapter {

Logger.log('(git) init')
await git.init({ fs, dir: this.dir })
await git.addRemote({ fs, dir: this.dir, url: this.server.url, remote: 'origin' })
await git.addRemote({
fs,
dir: this.dir,
url: this.server.url,
remote: 'origin'
})
Logger.log('(git) fetch from remote')
await git.fetch({ http, fs, dir: this.dir, ref: this.server.branch, remote: 'origin', depth: 10, onAuth: () => this.onAuth() })
await git.fetch({
http,
fs,
dir: this.dir,
tags: true,
singleBranch: true,
ref: this.server.branch,
remoteRef: this.server.branch,
remote: 'origin',
depth: 10,
onAuth: () => this.onAuth()
})
Logger.log('(git) checkout branch ' + (this.server.branch))
await git.checkout({ fs, dir: this.dir, ref: this.server.branch })

Expand Down

0 comments on commit 4cc8a6e

Please sign in to comment.