* Gitweb: Provide Git links in project list?
@ 2008-07-30 12:57 Robert Richter
2008-07-30 13:02 ` Fredrik Skolmli
2008-07-30 15:49 ` J.H.
0 siblings, 2 replies; 14+ messages in thread
From: Robert Richter @ 2008-07-30 12:57 UTC (permalink / raw)
To: git
The Gitweb on git.kernel.org povides links to the Git repository for
each project (git <git://...>). However, I did not find this feature
in the current implementation of git_project_list_body(). Does
somebody know if there is a patch available for this and if this could
be added to gitweb?
Thanks,
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Gitweb: Provide Git links in project list?
2008-07-30 12:57 Gitweb: Provide Git links in project list? Robert Richter
@ 2008-07-30 13:02 ` Fredrik Skolmli
2008-07-30 13:13 ` Robert Richter
2008-07-30 15:49 ` J.H.
1 sibling, 1 reply; 14+ messages in thread
From: Fredrik Skolmli @ 2008-07-30 13:02 UTC (permalink / raw)
To: Robert Richter; +Cc: git
On Wed, Jul 30, 2008 at 02:57:43PM +0200, Robert Richter wrote:
> The Gitweb on git.kernel.org povides links to the Git repository for
> each project (git <git://...>). However, I did not find this feature
> in the current implementation of git_project_list_body(). Does
> somebody know if there is a patch available for this and if this could
> be added to gitweb?
Is putting the address in .git/cloneurl giving the behaviour you're looking for?
- F
--
Regards,
Fredrik Skolmli
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Gitweb: Provide Git links in project list?
2008-07-30 13:02 ` Fredrik Skolmli
@ 2008-07-30 13:13 ` Robert Richter
2008-07-30 13:29 ` Fredrik Skolmli
2008-07-30 14:55 ` Bert Wesarg
0 siblings, 2 replies; 14+ messages in thread
From: Robert Richter @ 2008-07-30 13:13 UTC (permalink / raw)
To: Fredrik Skolmli; +Cc: git
On 30.07.08 15:02:57, Fredrik Skolmli wrote:
> On Wed, Jul 30, 2008 at 02:57:43PM +0200, Robert Richter wrote:
>
> > The Gitweb on git.kernel.org povides links to the Git repository for
> > each project (git <git://...>). However, I did not find this feature
> > in the current implementation of git_project_list_body(). Does
> > somebody know if there is a patch available for this and if this could
> > be added to gitweb?
>
> Is putting the address in .git/cloneurl giving the behaviour you're looking for?
Yes, I did change this and in the project summary I get "URL git://...".
That I mean is the main page, that lists the projects. I only have:
... summary | shortlog | log | tree
At git.kernel.org there is additional '... | git' with a link to the
Git repository.
The current source of gitweb seems not to provide this.
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Gitweb: Provide Git links in project list?
2008-07-30 13:13 ` Robert Richter
@ 2008-07-30 13:29 ` Fredrik Skolmli
2008-07-30 14:55 ` Bert Wesarg
1 sibling, 0 replies; 14+ messages in thread
From: Fredrik Skolmli @ 2008-07-30 13:29 UTC (permalink / raw)
To: Robert Richter; +Cc: git
On Wed, Jul 30, 2008 at 03:13:57PM +0200, Robert Richter wrote:
> At git.kernel.org there is additional '... | git' with a link to the
> Git repository.
Ah, sorry. I had a look before sending the mail, but apparently missed that
little detail.
--
Regards,
Fredrik Skolmli
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Gitweb: Provide Git links in project list?
2008-07-30 13:13 ` Robert Richter
2008-07-30 13:29 ` Fredrik Skolmli
@ 2008-07-30 14:55 ` Bert Wesarg
2008-07-30 15:27 ` Robert Richter
1 sibling, 1 reply; 14+ messages in thread
From: Bert Wesarg @ 2008-07-30 14:55 UTC (permalink / raw)
To: Robert Richter; +Cc: Fredrik Skolmli, git
On Wed, Jul 30, 2008 at 15:13, Robert Richter <robert.richter@amd.com> wrote:
> On 30.07.08 15:02:57, Fredrik Skolmli wrote:
>> On Wed, Jul 30, 2008 at 02:57:43PM +0200, Robert Richter wrote:
>>
>> > The Gitweb on git.kernel.org povides links to the Git repository for
>> > each project (git <git://...>). However, I did not find this feature
>> > in the current implementation of git_project_list_body(). Does
>> > somebody know if there is a patch available for this and if this could
>> > be added to gitweb?
>>
>> Is putting the address in .git/cloneurl giving the behaviour you're looking for?
>
> Yes, I did change this and in the project summary I get "URL git://...".
>
> That I mean is the main page, that lists the projects. I only have:
>
> ... summary | shortlog | log | tree
>
> At git.kernel.org there is additional '... | git' with a link to the
> Git repository.
>
> The current source of gitweb seems not to provide this.
Look here for all notible forks of gitweb:
http://git.or.cz/gitwiki/Gitweb
Bert
>
> -Robert
>
> --
> Advanced Micro Devices, Inc.
> Operating System Research Center
> email: robert.richter@amd.com
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Gitweb: Provide Git links in project list?
2008-07-30 14:55 ` Bert Wesarg
@ 2008-07-30 15:27 ` Robert Richter
0 siblings, 0 replies; 14+ messages in thread
From: Robert Richter @ 2008-07-30 15:27 UTC (permalink / raw)
To: Bert Wesarg; +Cc: Fredrik Skolmli, git
On 30.07.08 16:55:40, Bert Wesarg wrote:
> > The current source of gitweb seems not to provide this.
>
> Look here for all notible forks of gitweb:
>
> http://git.or.cz/gitwiki/Gitweb
>
> Bert
Thanks Bert, it is in the kernel.org repository.
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Gitweb: Provide Git links in project list?
2008-07-30 12:57 Gitweb: Provide Git links in project list? Robert Richter
2008-07-30 13:02 ` Fredrik Skolmli
@ 2008-07-30 15:49 ` J.H.
2008-07-30 16:11 ` Robert Richter
2008-07-30 16:41 ` Boyd Lynn Gerber
1 sibling, 2 replies; 14+ messages in thread
From: J.H. @ 2008-07-30 15:49 UTC (permalink / raw)
To: Robert Richter; +Cc: git
Robert,
That is a kernel.org specific change - if the community at large wants
it I can dig the patch out (I likely didn't do it as it's own patch when
I did it, being young, naive and stupid at the time - I'm now slightly
older and slightly less naive now ;-)
But yeah - if people feel that's interesting I'm happy to rip it out
later today and submit it to the mailing list.
- John 'Warthog9' Hawley
On Wed, 2008-07-30 at 14:57 +0200, Robert Richter wrote:
> The Gitweb on git.kernel.org povides links to the Git repository for
> each project (git <git://...>). However, I did not find this feature
> in the current implementation of git_project_list_body(). Does
> somebody know if there is a patch available for this and if this could
> be added to gitweb?
>
> Thanks,
>
> -Robert
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Gitweb: Provide Git links in project list?
2008-07-30 15:49 ` J.H.
@ 2008-07-30 16:11 ` Robert Richter
2008-08-03 20:53 ` J.H.
2008-07-30 16:41 ` Boyd Lynn Gerber
1 sibling, 1 reply; 14+ messages in thread
From: Robert Richter @ 2008-07-30 16:11 UTC (permalink / raw)
To: J.H.; +Cc: git
On 30.07.08 08:49:30, J.H. wrote:
> That is a kernel.org specific change - if the community at large wants
> it I can dig the patch out (I likely didn't do it as it's own patch when
> I did it, being young, naive and stupid at the time - I'm now slightly
> older and slightly less naive now ;-)
>
> But yeah - if people feel that's interesting I'm happy to rip it out
> later today and submit it to the mailing list.
John, I would like the patch.
Yes, I have seen the commit as well and it is not the only change in
this commit. Also, if I got it right, the repository is not taken from
.git/cloneurl. So, with the current implementation the git url in the
summary page may be different to cloneurl. But this is not a major
issue.
It would be great if you could provide a patch with your changes for
gitweb.
Thanks,
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Gitweb: Provide Git links in project list?
2008-07-30 15:49 ` J.H.
2008-07-30 16:11 ` Robert Richter
@ 2008-07-30 16:41 ` Boyd Lynn Gerber
1 sibling, 0 replies; 14+ messages in thread
From: Boyd Lynn Gerber @ 2008-07-30 16:41 UTC (permalink / raw)
To: J.H.; +Cc: Robert Richter, git
On Wed, 30 Jul 2008, J.H. wrote:
> That is a kernel.org specific change - if the community at large wants
> it I can dig the patch out (I likely didn't do it as it's own patch when
> I did it, being young, naive and stupid at the time - I'm now slightly
> older and slightly less naive now ;-)
>
> But yeah - if people feel that's interesting I'm happy to rip it out
> later today and submit it to the mailing list.
I would like to see the patch. I think it would be good to get it
included.
Thanks,
--
Boyd Gerber <gerberb@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Gitweb: Provide Git links in project list?
2008-07-30 16:11 ` Robert Richter
@ 2008-08-03 20:53 ` J.H.
2008-08-04 10:06 ` [PATCH] Gitweb: Provide Git links in project list Robert Richter
2008-08-04 10:12 ` Gitweb: Provide Git links in project list? Robert Richter
0 siblings, 2 replies; 14+ messages in thread
From: J.H. @ 2008-08-03 20:53 UTC (permalink / raw)
To: Robert Richter; +Cc: git
Working on refactoring the patch so that it can go upstream, one of the
things I'm definitely making an assumption about (in my original code)
is that the base url will be uniform for the entire project_list (as it
is on kernel.org). If that's acceptable I will probably be able to
submit something today, if not I will need to muck about and read out
the url from .git/cloneurl (which would be a rather hefty performance
hit - needing to read that from each repository)
- John
On Wed, 2008-07-30 at 18:11 +0200, Robert Richter wrote:
> On 30.07.08 08:49:30, J.H. wrote:
> > That is a kernel.org specific change - if the community at large wants
> > it I can dig the patch out (I likely didn't do it as it's own patch when
> > I did it, being young, naive and stupid at the time - I'm now slightly
> > older and slightly less naive now ;-)
> >
> > But yeah - if people feel that's interesting I'm happy to rip it out
> > later today and submit it to the mailing list.
>
> John, I would like the patch.
>
> Yes, I have seen the commit as well and it is not the only change in
> this commit. Also, if I got it right, the repository is not taken from
> .git/cloneurl. So, with the current implementation the git url in the
> summary page may be different to cloneurl. But this is not a major
> issue.
>
> It would be great if you could provide a patch with your changes for
> gitweb.
>
> Thanks,
>
> -Robert
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] Gitweb: Provide Git links in project list
2008-08-03 20:53 ` J.H.
@ 2008-08-04 10:06 ` Robert Richter
2008-08-04 10:12 ` Gitweb: Provide Git links in project list? Robert Richter
1 sibling, 0 replies; 14+ messages in thread
From: Robert Richter @ 2008-08-04 10:06 UTC (permalink / raw)
To: J.H.; +Cc: Junio C Hamano, git, Robert Richter
Signed-off-by: Robert Richter <robert.richter@amd.com>
---
gitweb/gitweb.perl | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 90cd99b..6d9b7aa 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3558,6 +3558,9 @@ sub fill_project_list_info {
if (!defined $pr->{'owner'}) {
$pr->{'owner'} = git_get_project_owner("$pr->{'path'}") || "";
}
+ if (!defined $pr->{'url_link'}) {
+ $pr->{'url_link'} = (git_get_project_url_list("$pr->{'path'}"))[0] || "";
+ }
if ($check_forks) {
my $pname = $pr->{'path'};
if (($pname =~ s/\.git$//) &&
@@ -3661,6 +3664,7 @@ sub git_project_list_body {
$cgi->a({-href => href(project=>$pr->{'path'}, action=>"shortlog")}, "shortlog") . " | " .
$cgi->a({-href => href(project=>$pr->{'path'}, action=>"log")}, "log") . " | " .
$cgi->a({-href => href(project=>$pr->{'path'}, action=>"tree")}, "tree") .
+ ($pr->{'url_link'} ? " | " . $cgi->a({-href => $pr->{'url_link'}}, "git") : '') .
($pr->{'forks'} ? " | " . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"forks")}, "forks") : '') .
"</td>\n" .
"</tr>\n";
--
1.5.5.4
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: Gitweb: Provide Git links in project list?
2008-08-03 20:53 ` J.H.
2008-08-04 10:06 ` [PATCH] Gitweb: Provide Git links in project list Robert Richter
@ 2008-08-04 10:12 ` Robert Richter
2008-08-04 16:26 ` J.H.
1 sibling, 1 reply; 14+ messages in thread
From: Robert Richter @ 2008-08-04 10:12 UTC (permalink / raw)
To: J.H.; +Cc: git
On 03.08.08 13:53:13, J.H. wrote:
> Working on refactoring the patch so that it can go upstream, one of the
> things I'm definitely making an assumption about (in my original code)
> is that the base url will be uniform for the entire project_list (as it
> is on kernel.org). If that's acceptable I will probably be able to
> submit something today, if not I will need to muck about and read out
> the url from .git/cloneurl (which would be a rather hefty performance
> hit - needing to read that from each repository)
John,
I just sent out a patch that implements this using cloneurl. It seemed
small and easy to implement and so I just made the change myself.
Thank you anyway.
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Gitweb: Provide Git links in project list?
2008-08-04 10:12 ` Gitweb: Provide Git links in project list? Robert Richter
@ 2008-08-04 16:26 ` J.H.
2008-08-04 20:10 ` Petr Baudis
0 siblings, 1 reply; 14+ messages in thread
From: J.H. @ 2008-08-04 16:26 UTC (permalink / raw)
To: Robert Richter; +Cc: git
Robert,
Noticed, but while I agree cloneurl is good - I think it kind of defeats
the purpose of what I was originally intending with the 'git' link.
I've gone back in to understand cloneurl better and I genuinely think
this is the wrong approach (or at least not what was originally intended
with the 'git' link as I envisioned it).
The git link was always meant / intended to be a link to acquire the git
repository directly, and be independent of what is actually present in
the cloneurl file, specifically I wanted it to be a (1) git url
(git://<hostname>/<path>) so that it took advantage of git specifically
vs. accidentally giving you something with ssh or http. and (2) was
uniform and did *not* depend on something in the repository as with
large set of repositories, kernel.org, there is no way we can police
this and we explicitly do not want to have a script that automatically
adds this or what not.
I have two other concerns with the patch your proposing
(1) it's on by default, and it seems that there are a number of sites
that don't actually want this functionality, making it a configurable
option would seem prudent in that case
(2) ignoring my comments on why I think using cloneurl for a large site
is bad (after I looked into it), blindly on taking the first option in
the file may lead to the display of unexpected or unintended URLs.
That said, it's probably worth merging the two patches (since I'm
already there with the configuration options, etc) that way people can
get either functionality should they choose.
- John 'Warthog9' Hawley
On Mon, 2008-08-04 at 12:12 +0200, Robert Richter wrote:
> On 03.08.08 13:53:13, J.H. wrote:
> > Working on refactoring the patch so that it can go upstream, one of the
> > things I'm definitely making an assumption about (in my original code)
> > is that the base url will be uniform for the entire project_list (as it
> > is on kernel.org). If that's acceptable I will probably be able to
> > submit something today, if not I will need to muck about and read out
> > the url from .git/cloneurl (which would be a rather hefty performance
> > hit - needing to read that from each repository)
>
> John,
>
> I just sent out a patch that implements this using cloneurl. It seemed
> small and easy to implement and so I just made the change myself.
>
> Thank you anyway.
>
> -Robert
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Gitweb: Provide Git links in project list?
2008-08-04 16:26 ` J.H.
@ 2008-08-04 20:10 ` Petr Baudis
0 siblings, 0 replies; 14+ messages in thread
From: Petr Baudis @ 2008-08-04 20:10 UTC (permalink / raw)
To: J.H.; +Cc: Robert Richter, git
Hi,
On Mon, Aug 04, 2008 at 09:26:54AM -0700, J.H. wrote:
> The git link was always meant / intended to be a link to acquire the git
> repository directly, and be independent of what is actually present in
> the cloneurl file, specifically I wanted it to be a (1) git url
> (git://<hostname>/<path>) so that it took advantage of git specifically
> vs. accidentally giving you something with ssh or http.
we could grep the cloneurl.
The thing is, some sites like repo.or.cz don't use per-project
cloneurl but do specify pull URLs by @git_base_url_list and this is
introducing unnecessary redundancy.
> and (2) was
> uniform and did *not* depend on something in the repository as with
> large set of repositories, kernel.org, there is no way we can police
> this and we explicitly do not want to have a script that automatically
> adds this or what not.
Then why do you allow cloneurl in the repositories at all, if you
think the links won't be trustworthy? What is the fundamental difference
between what you show on the project list page and the URLs in the
project summary page?
> I have two other concerns with the patch your proposing
>
> (1) it's on by default, and it seems that there are a number of sites
> that don't actually want this functionality, making it a configurable
> option would seem prudent in that case
I actually plan to remove the 'log' link from the project list; I
really wonder about the practicality of the 'git' link... but if there
were any widely used browser integrations (like firing up git-gui when
clicking on a git:// link), I *would* definitely see it more useful than
the 'log' link and add it to repo.or.cz. But I have never heard about
anyone actually doing this (but I think it might make a lot of sense;
thinking about it, I might try to patch msysgit to do this on Windows,
this would be nifty for my current dayjob project :).
> That said, it's probably worth merging the two patches (since I'm
> already there with the configuration options, etc) that way people can
> get either functionality should they choose.
Configuration options are expensive on human users. Please let's not
add more too carelessly.
--
Petr "Pasky" Baudis
The next generation of interesting software will be done
on the Macintosh, not the IBM PC. -- Bill Gates
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2008-08-04 20:11 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-30 12:57 Gitweb: Provide Git links in project list? Robert Richter
2008-07-30 13:02 ` Fredrik Skolmli
2008-07-30 13:13 ` Robert Richter
2008-07-30 13:29 ` Fredrik Skolmli
2008-07-30 14:55 ` Bert Wesarg
2008-07-30 15:27 ` Robert Richter
2008-07-30 15:49 ` J.H.
2008-07-30 16:11 ` Robert Richter
2008-08-03 20:53 ` J.H.
2008-08-04 10:06 ` [PATCH] Gitweb: Provide Git links in project list Robert Richter
2008-08-04 10:12 ` Gitweb: Provide Git links in project list? Robert Richter
2008-08-04 16:26 ` J.H.
2008-08-04 20:10 ` Petr Baudis
2008-07-30 16:41 ` Boyd Lynn Gerber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).