Merge pull request #555 from qistoph/remoteonly

Check updates (in updatenotification) only for repos with remote
This commit is contained in:
Michael Teeuw 2016-12-08 15:29:17 +01:00 committed by GitHub
commit eade89da48

View File

@ -29,7 +29,18 @@ module.exports = NodeHelper.create({
continue;
}
simpleGits.push({"module": moduleName, "git": SimpleGit(moduleFolder)});
var res = function(mn, mf) {
var git = SimpleGit(mf);
git.getRemotes(true, function(err, remotes) {
if (remotes.length < 1 || remotes[0].name.length < 1) {
// No valid remote for folder, skip
return;
}
// Folder has .git and has at least one git remote, watch this folder
simpleGits.push({"module": mn, "git": git});
});
}(moduleName, moduleFolder);
}
}