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

[PATCHv3 4/4] gitweb: link heads and remotes view

From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date
Nov 16, 2008, 13:28 UTC
Message-ID
<1226842089-1159-5-git-send-email-giuseppe.bilotta@gmail.com>
In-Reply-To
<1226842089-1159-4-git-send-email-giuseppe.bilotta@gmail.com>
Add a link in heads view to remotes view (if the feature is
enabled), and conversely from remotes to heads.
---
 gitweb/gitweb.perl |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 6b09918..95162db 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4736,7 +4736,10 @@ sub git_tags {
 sub git_heads {
 	my $head = git_get_head_hash($project);
 	git_header_html();
-	git_print_page_nav('','', $head,undef,$head);
+	my $heads_nav = gitweb_check_feature('remote_heads') ?
+		$cgi->a({-href => href(action=>"remotes", -replay=>1)},
+		        "remotes") : undef;
+	git_print_page_nav('','', $head,undef,$head, $heads_nav);
 	git_print_header_div('summary', $project);
 
 	my @headslist = git_get_heads_list(undef, 'heads');
@@ -4752,7 +4755,10 @@ sub git_remotes {
 
 	my $head = git_get_head_hash($project);
 	git_header_html();
-	git_print_page_nav('','', $head,undef,$head);
+	my $heads_nav =
+		$cgi->a({-href => href(action=>"heads", -replay=>1)},
+		        "heads");
+	git_print_page_nav('','', $head,undef,$head, $heads_nav);
 	git_print_header_div('summary', $project);
 
 	my @remotelist = git_get_heads_list(undef, 'remotes');
-- 
1.5.6.5
Previous: Giuseppe BilottaNext: Junio C Hamano
Message 5 of 14 in “[PATCHv3 0/4] gitweb: remote heads feature”
  1. Giuseppe BilottaNov 16, 2008
  2. 1/4 gitweb: introduce remote_heads featureGiuseppe Bilotta, Nov 16, 2008
  3. 2/4 gitweb: git_get_heads_list accepts an optional list of refs.Giuseppe Bilotta, Nov 16, 2008
  4. 3/4 gitweb: separate heads and remotes listsGiuseppe Bilotta, Nov 16, 2008
  5. 4/4 gitweb: link heads and remotes viewGiuseppe Bilotta, Nov 16, 2008
  6. Junio C HamanoNov 16, 2008
  7. Giuseppe BilottaNov 17, 2008
  8. Giuseppe BilottaNov 17, 2008
  9. Junio C HamanoNov 16, 2008
  10. Jakub NarebskiNov 17, 2008
  11. Junio C HamanoNov 16, 2008
  12. Giuseppe BilottaNov 16, 2008
  13. Junio C HamanoNov 16, 2008
  14. Giuseppe BilottaNov 16, 2008

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.