From c44d398b2cfb311202b3eb5fbb0ab07adf198880 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sun, 29 Sep 2013 12:32:47 +0200 Subject: [PATCH] Make tgit protocol handler include a command Now tgit-links work as follows: tgit://clone/https://code.google.com/p/tortoisegit/ Signed-off-by: Sven Strickroth --- src/Changelog.txt | 2 +- src/TortoiseGitSetup/StructureFragment.wxi | 2 +- src/TortoiseProc/TortoiseProc.cpp | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Changelog.txt b/src/Changelog.txt index adfe92641..4e3c4b0da 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -11,7 +11,7 @@ Released: Unreleased * Fixed issue #1870: Commit subset of changes selected from diff dialog * Fixed issue #1785: If PuTTY defaults to anything other than type SSH port 22, TortoiseGit acts up on SSH cloning (fixed in TortoiseGitPlink.exe) * Add setting to confirm to kill running git process in progress dialog - * Added support for tgit://-links to start cloning from browser + * Added support for tgit://-links to start cloning from browser (e.g. tgit://clone/https://code.google.com/p/tortoisegit/) * Added optional support for git://-links to start cloning from browser * Added optional support for smartgit:// and github-windows://-links to start cloning from browser In order to use github-windows://-links from Github, you have to enable them by installing and registering the Github client first diff --git a/src/TortoiseGitSetup/StructureFragment.wxi b/src/TortoiseGitSetup/StructureFragment.wxi index 482173887..2e2cbc3f5 100644 --- a/src/TortoiseGitSetup/StructureFragment.wxi +++ b/src/TortoiseGitSetup/StructureFragment.wxi @@ -615,7 +615,7 @@ - + diff --git a/src/TortoiseProc/TortoiseProc.cpp b/src/TortoiseProc/TortoiseProc.cpp index b386bf902..44b4c5b79 100644 --- a/src/TortoiseProc/TortoiseProc.cpp +++ b/src/TortoiseProc/TortoiseProc.cpp @@ -269,7 +269,11 @@ BOOL CTortoiseProcApp::InitInstance() if (parser.HasKey(_T("urlhandler"))) { CString url = parser.GetVal(_T("urlhandler")); - if (url.Find(_T("github-windows://openRepo/")) == 0) + if (url.Find(_T("tgit://clone/")) == 0) + { + url = url.Mid(13); // 21 = "tgit://clone/".GetLength() + } + else if (url.Find(_T("github-windows://openRepo/")) == 0) { url = url.Mid(26); // 26 = "github-windows://openRepo/".GetLength() int questioMark = url.Find('?'); -- 2.11.4.GIT