浏览代码

Changes pull to fetch if no tracking branch

main
Eric Amodio 5 年前
父节点
当前提交
d11cb57f05
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. +7
    -1
      src/git/models/repository.ts

+ 7
- 1
src/git/models/repository.ts 查看文件

@ -340,7 +340,13 @@ export class Repository implements Disposable {
}
private async pullCore() {
void (await commands.executeCommand('git.pull', this.path));
const tracking = await this.hasTrackingBranch();
if (tracking) {
void (await commands.executeCommand('git.pull', this.path));
}
else if (configuration.getAny<boolean>('git.fetchOnPull', Uri.file(this.path))) {
void (await Container.git.fetch(this.path));
}
this.fireChange(RepositoryChange.Repository);
}

正在加载...
取消
保存