[PATCH] add TITLE to log commit entries

Lukas Fleischer cgit at cryptocrack.de
Wed Mar 14 23:03:50 CET 2012


On Fri, Mar 02, 2012 at 04:08:59PM -0600, Josef wells wrote:
> ---
>  ui-shared.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/ui-shared.c b/ui-shared.c
> index 3e9282f..305342d 100644
> --- a/ui-shared.c
> +++ b/ui-shared.c
> @@ -360,7 +360,12 @@ void cgit_commit_link(char *name, const char
> *title, const char *class,
>  		html("ignorews=1");
>  		delim = "&";
>  	}
> -	html("'>");
> +	html("' ");

I know I'm nitpicking but I'd rather go with moving 'html("'>");' to an
else branch to the if-block below. Benefit: No unneeded space and
html() is only called once (instead of twice).

> +	if (rev && strcmp(rev, ctx.qry.head)) {
> +		html("TITLE=");
> +		html_url_arg(rev);

This looks wrong:

1. Lowercase attributes, please. We're not using uppercase anywhere.
2. Quote the attribute value.
3. html_url_arg() isn't the right function. Use html_attr() instead.

> +	}
> +	html(">");
>  	html_txt(name);
>  	html("</a>");
>  }
> -- 
> 1.7.7.3
> 
> _______________________________________________
> cgit mailing list
> cgit at hjemli.net
> http://hjemli.net/mailman/listinfo/cgit




More information about the CGit mailing list