Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Vogt2013-12-09 20:47:24 +0000
committerMatthias Sohn2013-12-12 22:10:05 +0000
commit1336f80c135d6518a408b3f3f6958264981ed870 (patch)
tree8898054ab7a2224fa8c858df6a4e5ab554531899
parent0ed347efb379f2fd6d059619efe9d7bf78e841cd (diff)
downloadegit-1336f80c135d6518a408b3f3f6958264981ed870.tar.gz
egit-1336f80c135d6518a408b3f3f6958264981ed870.tar.xz
egit-1336f80c135d6518a408b3f3f6958264981ed870.zip
Strip git clone from pasted URL
Gerrit and Gitblit add git clone to the URLs their wizards add to the clipboard. When pasting these URLs into EGit the wizard doesn't recognize these and displays an error. For convenience, strip git clone from the pasted text before converting them to an URI. Change-Id: If24def9bf4b7289bbaabff8fcee8f5046ec2001a Signed-off-by: Sascha Vogt <sascha@vogt-neuenbuerg.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/PasteCommand.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/PasteCommand.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/PasteCommand.java
index 4c6b6f994d..ce67c5f67e 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/PasteCommand.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/PasteCommand.java
@@ -8,6 +8,7 @@
* Contributors:
* Mathias Kinzler (SAP AG) - initial implementation
* Matthias Sohn (SAP AG) - imply .git if parent folder is given
+ * Sascha Vogt (SEEBURGER AG) - strip "git clone" from pasted URL
*******************************************************************************/
package org.eclipse.egit.ui.internal.repository.tree.command;
@@ -104,6 +105,8 @@ public class PasteCommand extends
}
private URIish getCloneURI(String content) {
+ if (content != null && content.startsWith("git clone")) //$NON-NLS-1$
+ content = content.substring(9);
URIish finalURI;
try {
finalURI = new URIish(content.trim());

Back to the top