{"thread":{"id":"15769","subject":"[PATCH] Associate 'git gui clone' with the git:// protocol","startedAt":"2008-10-03T12:19:08Z","lastAt":"2008-10-03T12:19:08Z","messageCount":1,"participants":["Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"92243","messageId":"20081003121908.GD10360@machine.or.cz","threadId":"15769","inReplyTo":null,"subject":"[PATCH] Associate 'git gui clone' with the git:// protocol","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2008-10-03T12:19:08Z","receivedAt":"2008-10-03T12:19:08Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"This MSysGit patch makes the installer register 'git gui clone'\nas the Git URL protocol handler. This depends on the 'git gui clone'\nfunctionality itself, of course - currently in the process of getting\naccepted upstream (hopefully).\n\nSigned-off-by: Petr Baudis <petr.baudis@novartis.com>\n\n---\n\nSorry if the line offsets are a bit off.\n\ndiff --git a/share/WinGit/install.iss b/share/WinGit/install.iss\nindex 05fdae6..82e8ecf 100644\n--- a/share/WinGit/install.iss\n+++ b/share/WinGit/install.iss\n@@ -484,6 +484,16 @@ begin\n             // so we continue.\n         end;\n     end;\n+\n+    if (not RegWriteStringValue(HKEY_CLASSES_ROOT,'git','','URL:Git Protocol'))\n+    or (not RegWriteStringValue(HKEY_CLASSES_ROOT,'git','URL Protocol',''))\n+    or (not RegWriteStringValue(HKEY_CLASSES_ROOT,'git\\shell\\open\\command','','\"'+AppDir+'\\bin\\wish.exe\" \"'+AppDir+'\\bin\\git-gui\" \"clone\" \"%1\"')) then begin\n+        Msg:='Line {#emit __LINE__}: Unable to set up the \"git://\" URL protocol handler.';\n+        MsgBox(Msg,mbError,MB_OK);\n+        Log(Msg);\n+        // This is not a critical error, the user can probably fix it manually,\n+        // so we continue.\n+    end;\n end;\n \n {\n"}]}