]> Lady’s Gitweb - Gitweb/commit
gitweb: Easier adding/changing parameters to current URL
authorJakub Narebski <redacted>
Thu, 1 Nov 2007 12:06:27 +0000 (13:06 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:12 +0000 (00:07 -0400)
commit2976ca13640b0b8da3cb557834a978cf0a4eaca7949ee5497b5a1b65445ceb08
treee20b8ee6c65399f3632676c41ecfa53444ff40fc8260d5ad2ddaf64ff10cc532
parent5293f94aa5ef7e27b0820bee97e6f682ed73041bee040a36057d0b325db1e4e8
gitweb: Easier adding/changing parameters to current URL

Add boolean option '-replay' to href() subroutine, which is used to
generate links in gitweb.  This option "replays" current URL,
overriding it with provided parameters.  It means that current value
of each CGI parameter is used unless otherwise provided.

This change is meant to make it easier to generate links which differ
from current page URL only by one parameter, for example the same view
but sorted by different column:
  href(-replay=>1, order=>"age")
or view which differs by some option, e.g. in log views
  href(-replay=>1, extra_options=>"--no-merges")
or alternate view of the same object, e.g. in the 'blob' view
  href(-replay=>1, action=>"blob_plain")

Actual use of this functionality is left for later.

Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl
This page took 0.153832 seconds and 4 git commands to generate.