diff options
author | Sascha Vogt | 2013-12-09 20:47:24 +0000 |
---|---|---|
committer | Matthias Sohn | 2013-12-12 22:10:05 +0000 |
commit | 1336f80c135d6518a408b3f3f6958264981ed870 (patch) | |
tree | 8898054ab7a2224fa8c858df6a4e5ab554531899 | |
parent | 0ed347efb379f2fd6d059619efe9d7bf78e841cd (diff) | |
download | egit-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.java | 3 |
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()); |