Re: [PATCH v2 11/11] gitweb: CSS style and refs mark for detached HEAD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 14 Nov 2008, Giuseppe Bilotta wrote:

> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@xxxxxxxxx>
> ---
>  gitweb/gitweb.css  |    5 +++++
>  gitweb/gitweb.perl |    2 +-
>  2 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
> index 751749f..c0c4540 100644
> --- a/gitweb/gitweb.css
> +++ b/gitweb/gitweb.css
> @@ -523,6 +523,11 @@ span.refs span.head {
>  	border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
>  }
>  
> +span.refs span.detached {
> +	background-color: #ffaaaa;
> +	border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
> +}

Nice and good. I think.

> +
>  span.atnight {
>  	color: #cc0000;
>  }
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 256c962..51e133d 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -2298,7 +2298,7 @@ sub git_get_references {
>  	my %refs;
>  	if (git_is_head_detached()) {
>  		my $hash = git_get_head_hash($project);
> -		$refs{$hash} = [ 'HEAD' ];
> +		$refs{$hash} = [ 'detached/HEAD' ];

This, not so much.

Please, if you use some _*hack*_, and adding 'detached/' prefix is
certainly hack (you could have modified format_ref_marker() instead,
and that is probably better solution), you really should explain it
in detail in commit message.  Otherwise some time later somebody would
examine the code, say 'WTF?!?'... and even git-blame would not help ;-/

>  	}
>  	# 5dc01c595e6c6ec9ccda4f6f69c131c0dd945f8c refs/tags/v2.6.11
>  	# c39ae07f393806ccf406ef966e9a15afc43cc36a refs/tags/v2.6.11^{}
> -- 
> 1.5.6.5
> 
> 

-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux