Skip to content

Commit

Permalink
Changes pull to fetch if no tracking branch
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed May 22, 2019
1 parent 48ffc9f commit d11cb57
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/git/models/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d11cb57

Please sign in to comment.