From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] gitweb: Different colours for tags and heads
Date: Fri, 11 Aug 2006 17:34:42 +0200 [thread overview]
Message-ID: <ebi81l$qu$1@sea.gmane.org> (raw)
In-Reply-To: 20060811151224.177110@gmx.net
Thomas Kolejka wrote:
> Hello,
>
> with the following patch there are different colours for tags
> and heads in gitweb. So you can easily differentiate between
> them.
>
> Commit ca9e3b124f6313187da641b5cd55100c4ade6a9a
Based on which branch? Master, next? Which commit?
By the way, please do not put "Hello," in the commit message
part of patch. You can put your comments (like which branch
and/or commit is the batch based on) either after "---" and
before the patch itself, or at the beginning and separate them
from the commit message by "+++" (this separator is supported
by git tools, but some people use "-- >8 --" 'scissors' separator).
git-format-patch helps in correct formatting, and adds diffstat.
You would also be most probably asked to sign your patches, i.e.
add
Signed-off-by: Thomas Kolejka <Thomas.Kolejka@gmx.at>
line at the end of commit message.
I have send patch of similar nature:
"[PATCH 5/5] gitweb: Change appereance of marker of refs pointing to given object"
http://permalink.gmane.org/gmane.comp.version-control.git/24860
in which I split marker for refs poining to given object into
separate span elements. The patch was dropped because it followed
first version of "Great subroutine renames" patch.
I've planned on patch which does something similar to
yours, but in slightly different way: instead of two calls
to git_get_referencing (format_mark_referencing[*1*] after rename)
and two calls to read_info_ref (git_get_references after rename)
in your patch, read_info_ref would always add full name, of
which first component is the type of the tag.
I am wondering if to do this like in my abovementioned patch,
putting references in single string, separated by ':' (':' cannot
be part of valid ref name), or use array (anonymous array reference
to be more exact).
[*1*] Do you have better proposal for this name? Perhaps
format_referencing_marker, or just format_marker?
---
> # format marker of refs pointing to given object
> sub git_get_referencing {
> - my ($refs, $id) = @_;
> + my ($refs, $id, $class) = @_;
>
> if (defined $refs->{$id}) {
> - return ' <span class="tag">' . esc_html($refs->{$id}) . '</span>';
> + return " <span class=\"$class\">" . esc_html($refs->{$id}) . "</span>";
> } else {
> return "";
> }
[...]
> - my ($revlist, $from, $to, $refs, $extra) = @_;
> + my ($revlist, $from, $to, $refs, $heads, $extra) = @_;
[...]
> - #my $ref = defined $refs ? git_get_referencing($refs, $commit) : '';
> - my $ref = git_get_referencing($refs, $commit);
> + #my $ref = defined $refs ? git_get_referencing($refs, $commit, "tag") : '';
> + my $ref = git_get_referencing($refs, $commit, "tag");
> + my $head = git_get_referencing($heads, $commit, "head");
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
next prev parent reply other threads:[~2006-08-11 15:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-11 15:12 [PATCH] gitweb: Different colours for tags and heads Thomas Kolejka
2006-08-11 15:34 ` Jakub Narebski [this message]
2006-08-11 21:50 ` Junio C Hamano
2006-08-12 0:12 ` Jakub Narebski
2006-08-12 0:58 ` Junio C Hamano
2006-08-14 5:22 ` Martin Waitz
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='ebi81l$qu$1@sea.gmane.org' \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/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).