* [PATCH] add TITLE to log commit entries
@ 2012-03-02 22:08 Josefwells
2012-03-14 22:03 ` cgit
2012-03-18 9:55 ` hjemli
0 siblings, 2 replies; 3+ messages in thread
From: Josefwells @ 2012-03-02 22:08 UTC (permalink / raw)
---
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("' ");
+ if (rev && strcmp(rev, ctx.qry.head)) {
+ html("TITLE=");
+ html_url_arg(rev);
+ }
+ html(">");
html_txt(name);
html("</a>");
}
--
1.7.7.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] add TITLE to log commit entries
2012-03-02 22:08 [PATCH] add TITLE to log commit entries Josefwells
@ 2012-03-14 22:03 ` cgit
2012-03-18 9:55 ` hjemli
1 sibling, 0 replies; 3+ messages in thread
From: cgit @ 2012-03-14 22:03 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] add TITLE to log commit entries
2012-03-02 22:08 [PATCH] add TITLE to log commit entries Josefwells
2012-03-14 22:03 ` cgit
@ 2012-03-18 9:55 ` hjemli
1 sibling, 0 replies; 3+ messages in thread
From: hjemli @ 2012-03-18 9:55 UTC (permalink / raw)
On Fri, Mar 2, 2012 at 23:08, Josef wells <Josefwells at alumni.utexas.net> 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("' ");
> + ? ? ? if (rev && strcmp(rev, ctx.qry.head)) {
> + ? ? ? ? ? ? ? html("TITLE=");
> + ? ? ? ? ? ? ? html_url_arg(rev);
> + ? ? ? }
> + ? ? ? html(">");
> ? ? ? ?html_txt(name);
> ? ? ? ?html("</a>");
> ?}
The title-attribute is already set (in repolink()) from the title
argument, i.e. the caller of cgit_commit_link() decides what title, if
any, should be set on the link.
But fwiw, I don't think showing the commit sha1 as link title is very useful.
--
larsh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-18 9:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-02 22:08 [PATCH] add TITLE to log commit entries Josefwells
2012-03-14 22:03 ` cgit
2012-03-18 9:55 ` hjemli
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).