git-status2: amend added + fixed wisibleWhen for commit and reset
commands
diff --git a/bundles/org.eclipse.orion.client.git/web/git/git-commit.css b/bundles/org.eclipse.orion.client.git/web/git/git-commit.css
index 0c4000f..447d0e6 100644
--- a/bundles/org.eclipse.orion.client.git/web/git/git-commit.css
+++ b/bundles/org.eclipse.orion.client.git/web/git/git-commit.css
@@ -39,11 +39,6 @@
 	max-width:700px;

 }

 

-.plugin-settings {

-    overflow-x: hidden;

-    width: 100%;

-}

-

 pre {

 	margin-left: 10px;

     padding: 15px;

diff --git a/bundles/org.eclipse.orion.client.git/web/git/git-repository.css b/bundles/org.eclipse.orion.client.git/web/git/git-repository.css
index 3f2061f..ad0d9e8 100644
--- a/bundles/org.eclipse.orion.client.git/web/git/git-repository.css
+++ b/bundles/org.eclipse.orion.client.git/web/git/git-repository.css
@@ -48,11 +48,6 @@
 	max-width:700px;
 }
 
-.plugin-settings {
-    overflow-x: hidden;
-    width: 100%;
-}
-
 .activeBranch {
 	font-weight: bold;
 }
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
index 0c67588..6dcefa6 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
@@ -2364,7 +2364,8 @@
 		
 		commandService.addCommand(unstageCommand);
 		
-		var commitMessageParameters = new mCommands.ParametersDescription([new mCommands.CommandParameter('name', 'text', 'Commit message')]);
+		var commitMessageParameters = new mCommands.ParametersDescription(
+			[new mCommands.CommandParameter('name', 'text', 'Commit message:'), new mCommands.CommandParameter('amend', 'boolean', 'Amend:', false)]);
 		
 		var commitCommand = new mCommands.Command({
 			name: "Commit",
@@ -2376,6 +2377,7 @@
 				
 				var body = {};
 				body.Message = data.parameters.valueFor("name");
+				body.Amend = data.parameters.valueFor("amend");
 				
 				var progressService = serviceRegistry.getService("orion.page.message");
 				progressService.createProgressMonitor(
@@ -2387,7 +2389,7 @@
 				);
 			},
 			visibleWhen: function(item) {
-				return true;
+				return mGitUtil.hasStagedChanges(item);
 			}
 		});	
 
@@ -2422,8 +2424,7 @@
 			},
 			
 			visibleWhen: function(item) {
-				// TODO Should check if there are any local changes
-				return /*(self.hasStaged || self.hasUnstaged)*/ true;
+				return mGitUtil.hasStagedChanges(item) || mGitUtil.hasUnstagedChanges(item);;
 			}
 		});
 
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/util.js b/bundles/org.eclipse.orion.client.git/web/orion/git/util.js
index 5b0cfa3..ec3670f 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/util.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/util.js
@@ -54,11 +54,29 @@
 		return false;
 	}
 	
+	function hasStagedChanges(status){
+		for(var i = 0; i < interestedStagedGroup.length ; i++){
+			if (status[interestedStagedGroup[i]].length > 0)
+				return true;
+		}
+		return false;
+	}
+	
+	function hasUnstagedChanges(status){
+		for(var i = 0; i < interestedUnstagedGroup.length ; i++){
+			if (status[interestedUnstagedGroup[i]].length > 0)
+				return true;
+		}
+		return false;
+	}
+	
 	//return module exports
 	return {
 		isStaged: isStaged,
 		isUnstaged: isUnstaged,
-		isChange: isChange
+		isChange: isChange,
+		hasStagedChanges: hasStagedChanges,
+		hasUnstagedChanges: hasUnstagedChanges
 	};
 
 });