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

Re: [PATCH 2/3] gitweb: Allow for href() to be used for projectless links

From
Junio C Hamano <junkio@cox.net>
Date
Sep 15, 2006, 06:17 UTC
Message-ID
<7vzmd1zma7.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200609150457.16924.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
Show 5 quoted lines
> Change adding project to params if $params{"project"} is false
> to adding project to params if it not exist. It allows for href()
> to be used for projectless links by using "project=>undef" as
> argument, while still adding project to params by default
> in the most common case.
This did not parse very well, at least for me.
Show 14 quoted lines
> @@ -1304,9 +1305,11 @@ sub git_footer_html {
>  		if (defined $descr) {
>  			print "<div class=\"page_footer_text\">" . esc_html($descr) . "</div>\n";
>  		}
> -		print $cgi->a({-href => href(action=>"rss"), -class => "rss_logo"}, "RSS") . "\n";
> +		print $cgi->a({-href => href(action=>"rss"),
> +		              -class => "rss_logo"}, "RSS") . "\n";
>  	} else {
> -		print $cgi->a({-href => href(action=>"opml"), -class => "rss_logo"}, "OPML") . "\n";
> +		print $cgi->a({-href => href(project=>undef, action=>"opml"),
> +		              -class => "rss_logo"}, "OPML") . "\n";
>  	}
>  	print "</div>\n" .
>  	      "</body>\n" .

Argh. While I very much welcome folding of the long lines, I'd rather see a separate patch to clean up other loooooooong lines the current gitweb code has.

Previous: Jakub NarebskiNext: Jakub Narebski
Message 4 of 8 in “Add git_project_index, improve href()”
  1. 0/3 Add git_project_index, improve href()Jakub Narebski, Sep 15, 2006
  2. 1/3 gitweb: Add git_project_index for generating index.auxJakub Narebski, Sep 15, 2006
  3. 2/3 gitweb: Allow for href() to be used for projectless linksJakub Narebski, Sep 15, 2006
  4. Junio C HamanoSep 15, 2006
  5. Jakub NarebskiSep 15, 2006
  6. 3/3 gitweb: Add link to "project_index" view to "project_list" pageJakub Narebski, Sep 15, 2006
  7. 3/3 gitweb: Add link to "project_index" view to "project_list" pageJakub Narebski, Sep 15, 2006
  8. 2/3 gitweb: Allow for href() to be used for links without project paramJakub Narebski, Sep 15, 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.