All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@suse.cz>
To: msysgit@googlegroups.com
Cc: git@vger.kernel.org
Subject: [PATCH] Associate 'git gui clone' with the git:// protocol
Date: Fri, 3 Oct 2008 14:19:08 +0200	[thread overview]
Message-ID: <20081003121908.GD10360@machine.or.cz> (raw)

This MSysGit patch makes the installer register 'git gui clone'
as the Git URL protocol handler. This depends on the 'git gui clone'
functionality itself, of course - currently in the process of getting
accepted upstream (hopefully).

Signed-off-by: Petr Baudis <petr.baudis@novartis.com>

---

Sorry if the line offsets are a bit off.

diff --git a/share/WinGit/install.iss b/share/WinGit/install.iss
index 05fdae6..82e8ecf 100644
--- a/share/WinGit/install.iss
+++ b/share/WinGit/install.iss
@@ -484,6 +484,16 @@ begin
             // so we continue.
         end;
     end;
+
+    if (not RegWriteStringValue(HKEY_CLASSES_ROOT,'git','','URL:Git Protocol'))
+    or (not RegWriteStringValue(HKEY_CLASSES_ROOT,'git','URL Protocol',''))
+    or (not RegWriteStringValue(HKEY_CLASSES_ROOT,'git\shell\open\command','','"'+AppDir+'\bin\wish.exe" "'+AppDir+'\bin\git-gui" "clone" "%1"')) then begin
+        Msg:='Line {#emit __LINE__}: Unable to set up the "git://" URL protocol handler.';
+        MsgBox(Msg,mbError,MB_OK);
+        Log(Msg);
+        // This is not a critical error, the user can probably fix it manually,
+        // so we continue.
+    end;
 end;
 
 {

                 reply	other threads:[~2008-10-03 12:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081003121908.GD10360@machine.or.cz \
    --to=pasky@suse.cz \
    --cc=git@vger.kernel.org \
    --cc=msysgit@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.