All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gitweb: fix link to parent diff with pathinfo
@ 2016-05-06 10:19 Richard Braun
  2016-05-06 22:21 ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Braun @ 2016-05-06 10:19 UTC (permalink / raw)
  To: git

Signed-off-by: Richard Braun <rbraun@sceen.net>
---
 gitweb/gitweb.perl | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 05d7910..f7f7936 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1423,7 +1423,12 @@ sub href {
 			delete $params{'hash'};
 			delete $params{'hash_base'};
 		} elsif (defined $params{'hash'}) {
-			$href .= esc_path_info($params{'hash'});
+			if (defined $params{'hash_parent'}) {
+				$href .= esc_path_info($params{'hash_parent'});
+				delete $params{'hash_parent'};
+			} else {
+				$href .= esc_path_info($params{'hash'});
+			}
 			delete $params{'hash'};
 		}
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-05-25 22:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-06 10:19 [PATCH] gitweb: fix link to parent diff with pathinfo Richard Braun
2016-05-06 22:21 ` Junio C Hamano
2016-05-07  0:11   ` Richard Braun
2016-05-24 18:17     ` Junio C Hamano
2016-05-24 18:26       ` Richard Braun
2016-05-24 18:39         ` Junio C Hamano
2016-05-25 20:33       ` Jakub Narębski
2016-05-25 22:20         ` Richard Braun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.