Re: [RFC] Configuring (future) committags support in gitweb

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Francis Galiegue <fg@...>
Cc: <git@...>
Date: Saturday, November 8, 2008 - 6:35 pm

Dnia sobota 8. listopada 2008 21:02, Francis Galiegue napisał:
[...]


Like in example with 'link' rule, not having to write whole
<a href="http://example.com/bugzilla.php?id=$1">$&</a>
(or something like that).


Committags doesn't need to be replaced by links. In this case I meant
here using 'signoff' class for Signed-off-by: (and the like) lines, by
wrapping it in '<span class="signoff">' ... '</a>'.


SHA1 (or shortened SHA1 from 8 charasters to 40 characters, or to be
even more exact something that looks like SHA1) is replaced by link
to 'object' view, which in turn finds type of object and _redirect_
to proper view, be it 'commit' (most frequent), 'tag', 'blob' or 'tree'.

We could have used instead gitweb link with 'h' (hash) parameter, but
without 'a' (action) parameter, which currently finds type of object
and _uses_ correct view...
 

One might not want to link SHA1, for example if there are lots of false
positives because of commit message conventions or something, or refine
'signoff' committag to use different styles for different types of
signoff: Signed-off-by, Acked-by, Tested-by, other.  Having explicit
'signoff' committag allows us also to put some committags _after_ it,
for example SPAM-protection of emails, or add some committag before
'sha1' to filter out some SHA1 match false positives.
 

For example 'signoff' committag... well, it is not exactly pure "html"
but rather something like template.

  [committag "signoff"]
  	match = "(?i)^ *(signed[ \\-]off[ \\-]by[ :]|acked[ \\-]by[ :]|cc[ :])"
  	templ = "{<span class=\"signoff\">}$1{</span>}"

Or simpler

  [committag "signoff"]
  	match = "(?i)^ *(signed[ \\-]off[ \\-]by[ :]|acked[ \\-]by[ :]|cc[ :])"
  	class = signoff


For example in link match, the text of the link can be further refined
by committags later in sequence.

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

Messages in current thread:
[RFC] Configuring (future) committags support in gitweb, Jakub Narebski, (Sat Nov 8, 3:07 pm)
Re: [RFC] Configuring (future) committags support in gitweb, Francis Galiegue, (Sat Nov 8, 4:02 pm)
Re: [RFC] Configuring (future) committags support in gitweb, Jakub Narebski, (Sat Nov 8, 6:35 pm)
Addresses with full names in patch emails, Marcel M. Cary, (Tue Feb 24, 11:38 am)
Re: Addresses with full names in patch emails, Jakub Narebski, (Tue Feb 24, 11:58 am)
Re: [RFC] Configuring (future) committags support in gitweb, Francis Galiegue, (Sat Nov 8, 7:27 pm)