git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH] gitweb: Add committags support

From
Junio C Hamano <junkio@cox.net>
Date
Sep 24, 2006, 19:17 UTC
Message-ID
<7vac4p846a.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<ef6c42$h1b$1@sea.gmane.org>
Jakub Narebski <jnareb@gmail.com> writes:
Show 5 quoted lines
> Yet another question is how to deal with commit message specific
> "syntax highlighting". Currently, parsing commit message line by line,
> we treat specially signoff lines (syntax highlighting, and removing
> trailing empty lines after signoff), empty lines (we collapse consecutive
> empty lines); the rest goes through format_log_line_html... and committags.

Actually I was hoping that my bright idea(tm) of passing the whole message to a chain of tag markers would solve that automatically. You define a std marker whose purpose is _not_ to add anchor elements leading to other URLs but mark up sign-off lines and stuff. Put that at the beginning or at the end of the chain as you see fit and it would do its work just like other real tag markers would do.

For example, one of the things it would do is to unhighlight the Signed-off-by: lines. It would match and split with

	/(.*?)^(Signed-off-by: .*?)$(.*)/ms
then add:
	( $1, # pass as literal we did not touch
          \'<span class="signoff">', # unhighlight
          $2, # give chance to muck with e-mail address to downstream
	      # markers
          \'</span>'
        )

to its output buffer and process the rest ($3). A downstream tag maker may match e-mail address the above left and might mark it up with mailto: URL.

          
	
Previous: Jakub Narebski
Message 17 of 17 in “gitweb: Add committags support”
  1. gitweb: Add committags supportJakub Narebski, Sep 21, 2006
  2. Jakub NarebskiSep 22, 2006
  3. Petr BaudisSep 23, 2006
  4. Jakub NarebskiSep 23, 2006
  5. Petr BaudisSep 23, 2006
  6. Jakub NarebskiSep 23, 2006
  7. Petr BaudisSep 23, 2006
  8. Jakub NarebskiSep 25, 2006
  9. Petr BaudisSep 25, 2006
  10. Jakub NarebskiSep 26, 2006
  11. Junio C HamanoSep 23, 2006
  12. Jakub NarebskiSep 23, 2006
  13. Junio C HamanoSep 23, 2006
  14. Jakub NarebskiSep 24, 2006
  15. Junio C HamanoSep 24, 2006
  16. Jakub NarebskiSep 24, 2006
  17. Junio C HamanoSep 24, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.