From: Jakub Narebski <jnareb@gmail.com>
To: "Giuseppe Bilotta" <giuseppe.bilotta@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: gitweb and remote branches
Date: Thu, 30 Aug 2007 00:01:38 +0200 [thread overview]
Message-ID: <200708300001.39203.jnareb@gmail.com> (raw)
In-Reply-To: <cb7bb73a0708280453k4315e80ej170238a52e66dcb6@mail.gmail.com>
On Tue, 28 August 2007, Giuseppe Bilotta wrote:
> On 8/28/07, Giuseppe Bilotta <giuseppe.bilotta@gmail.com> wrote:
>>
>> I've given a better look at the code and I think I can whip up a patch
>> to implement the feature. I have no idea about how to create a new
>> option in gitweb though, so I'll have to leave it that to someone
>> else.
>
> Ok, this is hopefully the last time I reply to myself. I'm inlining
> the quick'n'dirty patch I've whipped up, hoping that gmail doesn't
> destroy it too much..
For quick'n'dirty solution this might be enough. For proper patch to
be accepted I don't think so.
First, in the idea to show also remote branches (from refs/remotes),
I wanted to separate heads list from remotes list in the 'summary'
view, and add 'remotes' view or modify 'heads' view to accept some
parameter specyfying kind of refs.
Second, what was stopping me from implementing that was an idea to
separate remote branches into categories (like gitwbe-xmms2 categories
of projects) defined by the remote it belongs to. And this is not so
easy if we want to respect old .git/branches/ and .git/remotes/ remote
config in addition to new config based remote config.
> --
> Giuseppe "Oblomov" Bilotta
>
> --- gitweb.cgi 2007-08-26 12:41:13.000000000 +0200
> +++ gitweb.cgi-my 2007-08-28 13:47:15.000000000 +0200
It is better to use git to manage source and to generate patches
(use git-format-patch, check Documentation/SubmittingPatches),
and use gitweb/gitweb.perl and not installed version.
[...]
> @@ -1677,8 +1677,9 @@ sub git_get_heads_list {
> my ($hash, $name, $title) = split(' ', $refinfo, 3);
> my ($committer, $epoch, $tz) =
> ($committerinfo =~ /^(.*) ([0-9]+) (.*)$/);
> - $name =~ s!^refs/heads/!!;
> + $name =~ s!^refs/(head|remote)s/!!;
>
> + $ref_item{'class'} = $1;
> $ref_item{'name'} = $name;
> $ref_item{'id'} = $hash;
> $ref_item{'title'} = $title || '(no commit message)';
Nice, although very minor nit: I'd use
> + $ref_item{'class'} = $1;
> @@ -3237,8 +3238,10 @@ sub git_heads_body {
> $alternate ^= 1;
> print "<td><i>$ref{'age'}</i></td>\n" .
> ($curr ? "<td class=\"current_head\">" : "<td>") .
> + "<span class=\"refs\"><span class=\"$ref{'class'}\">" .
> $cgi->a({-href => href(action=>"shortlog", hash=>$ref{'name'}),
> -class => "list name"},esc_html($ref{'name'})) .
> + "</span></span>" .
> "</td>\n" .
> "<td class=\"link\">" .
> $cgi->a({-href => href(action=>"shortlog",
> hash=>$ref{'name'})}, "shortlog") . " | " .
>
I don't understand this double span. First, you can set multiple
classes for HTML element by separating them by space, e.g.
"<span class=\"refs\ $ref{'class'}\">"
And you could have given appropriate class to <td> or <a> element
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2007-08-29 22:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-27 22:24 gitweb and remote branches Giuseppe Bilotta
2007-08-27 23:29 ` Jakub Narebski
[not found] ` <cb7bb73a0708280253y7d31f347yb84a40982d59d9d2@mail.gmail.com>
[not found] ` <cb7bb73a0708280453k4315e80ej170238a52e66dcb6@mail.gmail.com>
2007-08-29 22:01 ` Jakub Narebski [this message]
2007-08-30 7:18 ` Giuseppe Bilotta
2007-08-30 8:16 ` Jakub Narebski
2007-08-30 9:09 ` Giuseppe Bilotta
2007-08-30 21:07 ` Junio C Hamano
2007-08-30 23:09 ` Giuseppe Bilotta
2007-08-30 23:53 ` Jakub Narebski
2007-08-30 23:59 ` Giuseppe Bilotta
2007-08-31 2:15 ` Giuseppe Bilotta
2007-08-31 10:54 ` [PATCH 01/14] gitweb: get remotes too when getting heads list Giuseppe Bilotta
2007-08-31 10:55 ` [PATCH 02/14] gitweb: make remote heads in heads list optional Giuseppe Bilotta
2007-08-31 10:55 ` [PATCH 03/14] gitweb: git_get_heads_list now accepts an optional list of refs Giuseppe Bilotta
2007-08-31 10:55 ` [PATCH 04/14] gitweb: separate heads and remotes list in summary view Giuseppe Bilotta
2007-08-31 10:59 ` [PATCH 05/14] gitweb: allow refs passed to git_heads_body to use a name different from the hash name Giuseppe Bilotta
2007-08-31 11:05 ` [PATCH 06/14] gitweb: git_split_heads_body function Giuseppe Bilotta
2007-08-31 11:18 ` [PATCH 07/14] gitweb: use CSS to style split head lists Giuseppe Bilotta
2007-08-31 11:18 ` [PATCH 08/14] gitweb: add 'remotes' action as a synonym for git_heads() Giuseppe Bilotta
2007-08-31 11:18 ` [PATCH 09/14] gitweb: split heads list in head view if appropriate Giuseppe Bilotta
2007-08-31 11:19 ` [PATCH 10/14] gitweb: display HEAD in heads list when detached Giuseppe Bilotta
2007-08-31 11:19 ` [PATCH 11/14] gitweb: git_is_head_detached() function Giuseppe Bilotta
2007-08-31 11:19 ` [PATCH 12/14] gitweb: add HEAD to list of shortlog refs if detached Giuseppe Bilotta
2007-08-31 11:19 ` [PATCH 13/14] gitweb: CSS style and refs mark for detached HEAD Giuseppe Bilotta
2007-08-31 11:19 ` [PATCH 14/14] gitweb: minor whitespace cleanups Giuseppe Bilotta
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=200708300001.39203.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=giuseppe.bilotta@gmail.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 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).