summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorPiotr Janik2011-07-28 07:45:24 (EDT)
committer Tomasz Zarna2011-07-28 07:45:24 (EDT)
commit5096390df2021495863fed21ebd8aa5fc238999f (patch)
treea968f778cab25b1846125b9a65eb333ebd13c7bf
parent8a573cd05d27822913adedd697ffc2c93eae318c (diff)
downloadorg.eclipse.orion.client-5096390df2021495863fed21ebd8aa5fc238999f.zip
org.eclipse.orion.client-5096390df2021495863fed21ebd8aa5fc238999f.tar.gz
org.eclipse.orion.client-5096390df2021495863fed21ebd8aa5fc238999f.tar.bz2
bug 353120 - Git status is broken if user.name and user.email are not in
the repo configuration https://bugs.eclipse.org/bugs/show_bug.cgi?id=353120
-rw-r--r--bundles/org.eclipse.orion.client.git/web/orion/git/git-status-table.js45
1 files changed, 32 insertions, 13 deletions
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/git-status-table.js b/bundles/org.eclipse.orion.client.git/web/orion/git/git-status-table.js
index 85f57ac..10122cf 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/git-status-table.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/git-status-table.js
@@ -731,20 +731,39 @@ orion.GitStatusController = (function() {
}
that._registry.getService("orion.git.provider").then(function(gitService){
- var userNamePath = that._cloneInfo.Children[0].ConfigLocation.replace("config", "config/user.name");
- gitService.getGitCloneConfig(userNamePath).then(function(configEntry){
- that._userName = configEntry.Value;
- var userEmailPath = that._cloneInfo.Children[0].ConfigLocation.replace("config", "config/user.email");
- gitService.getGitCloneConfig(userEmailPath).then(function(configEntry){
- that._userEmail = configEntry.Value;
- gitService.getGitBranch(that._cloneInfo.Children[0].BranchLocation).then(function(children){
- that._branchInfo = children;
- gitService.getGitRemote(that._cloneInfo.Children[0].RemoteLocation).then(function(children){
- that._remoteInfo = children;
- that._processCloneInfo();
- that._processStatus();
+ gitService.getGitBranch(that._cloneInfo.Children[0].BranchLocation).then(function(children){
+ that._branchInfo = children;
+ gitService.getGitRemote(that._cloneInfo.Children[0].RemoteLocation).then(function(children){
+ that._remoteInfo = children;
+ var userNamePath = that._cloneInfo.Children[0].ConfigLocation.replace("config", "config/user.name");
+ var setUserEmailAndProcess = function(userEmail) {
+ that._userEmail = userEmail;
+ that._processCloneInfo();
+ that._processStatus();
+ };
+ gitService.getGitCloneConfig(userNamePath).then(
+ function(configEntry){
+ that._userName = configEntry.Value;
+ var userEmailPath = that._cloneInfo.Children[0].ConfigLocation.replace("config", "config/user.email");
+ gitService.getGitCloneConfig(userEmailPath).then(
+ function(configEntry){
+ setUserEmailAndProcess(configEntry.Value);
+ },
+ function(error) {
+ setUserEmailAndProcess("");
+ });
+ },
+ function(error) {
+ that._userName = "";
+ var userEmailPath = that._cloneInfo.Children[0].ConfigLocation.replace("config", "config/user.email");
+ gitService.getGitCloneConfig(userEmailPath).then(
+ function(configEntry){
+ setUserEmailAndProcess(configEntry.Value);
+ },
+ function(error) {
+ setUserEmailAndProcess("");
+ });
});
- });
});
});
});