Avoid git fetch when refreshing local status

This commit is contained in:
Nick O'Leary
2018-02-08 23:30:07 +00:00
parent 06a6a4408f
commit aa1cf0b228
4 changed files with 15 additions and 8 deletions

View File

@@ -410,11 +410,11 @@ Project.prototype.revertFile = function (filePath) {
Project.prototype.status = function(user) {
Project.prototype.status = function(user, includeRemote) {
var self = this;
var fetchPromise;
if (this.remotes) {
if (this.remotes && includeRemote) {
fetchPromise = gitTools.getRemoteBranch(self.path).then(function(remoteBranch) {
if (remoteBranch) {
var allRemotes = Object.keys(self.remotes);

View File

@@ -247,9 +247,9 @@ function pull(user, project,remoteBranchName,setRemote,allowUnrelatedHistories)
return reloadActiveProject("pull");
});
}
function getStatus(user, project) {
function getStatus(user, project, includeRemote) {
checkActiveProject(project);
return activeProject.status(user);
return activeProject.status(user, includeRemote);
}
function resolveMerge(user, project,file,resolution) {
checkActiveProject(project);