Git development
 help / color / mirror / Atom feed
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: Kay Sievers <kay.sievers@suse.de>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: gitweb: A git:// link for the project?
Date: Thu, 6 Apr 2006 21:14:34 +0200	[thread overview]
Message-ID: <20060406191434.GX13324@lug-owl.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 1729 bytes --]

Hi Kay!

I've got another small idea for gitweb, probably only a line or two,
but Perl isn't exactly my preferred language :)

The idea is to have a 'Copy Link-Lokation'able link presented by
gitweb, maybe placed right to summary, shortlog and log.

That should just link to a URL prefix
(git://git.yourbox.tld/some/path) plus the project path. I guess it's
something like this, but I haven't tested it. Should be good enough to
get an idea of what I ment:

Signed-off-by: Jan-Benedict Glaw <jbglaw@lug-owl.de>

diff --git a/gitweb.cgi b/gitweb.cgi
index c1bb624..b2942fd 100755
--- a/gitweb.cgi
+++ b/gitweb.cgi
@@ -26,6 +26,9 @@ my $rss_link =		"";
 #my $projectroot =	"/pub/scm";
 my $projectroot =	"/home/kay/public_html/pub/scm";
 
+# URL prefix for the git:// link
+my $urlprefix =		"git://git.kernel.org/pub/scm";
+
 # location of the git-core binaries
 my $gitbin =		"/usr/bin";
 
@@ -920,6 +923,7 @@ sub git_project_list {
 		      $cgi->a({-href => "$my_uri?" . esc_param("p=$pr->{'path'};a=summary")}, "summary") .
 		      " | " . $cgi->a({-href => "$my_uri?" . esc_param("p=$pr->{'path'};a=shortlog")}, "shortlog") .
 		      " | " . $cgi->a({-href => "$my_uri?" . esc_param("p=$pr->{'path'};a=log")}, "log") .
+		      " | " . $cgi->a({-href => "$urlprefix" . esc_param("/$pr->{'path'}")}, "GIT") .
 		      "</td>\n" .
 		      "</tr>\n";
 	}


-- 
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

                 reply	other threads:[~2006-04-06 19:14 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=20060406191434.GX13324@lug-owl.de \
    --to=jbglaw@lug-owl.de \
    --cc=git@vger.kernel.org \
    --cc=kay.sievers@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox