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

[PATCH] gitweb: Provide RSS feeds for file history

From
Steven Walter <stevenrwalter@gmail.com>
Date
Aug 3, 2007, 02:05 UTC
Message-ID
<20070803020555.GB8593@dervierte>
If git_feed is provided a file name, it ought to show only the history
affecting that file.  The title was already being set correctly, but all
commits from history were being shown anyway.
---
 gitweb/gitweb.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 498b936..26932a4 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -611,6 +611,7 @@ sub href(%) {
 	my %mapping = @mapping;
 
 	$params{'project'} = $project unless exists $params{'project'};
+	$params{'file_name'} = $file_name unless exists $params{'file_name'};
 
 	my ($use_pathinfo) = gitweb_check_feature('pathinfo');
 	if ($use_pathinfo) {
@@ -5365,7 +5366,7 @@ sub git_feed {
 
 	# log/feed of current (HEAD) branch, log of given branch, history of file/directory
 	my $head = $hash || 'HEAD';
-	my @commitlist = parse_commits($head, 150);
+	my @commitlist = parse_commits($head, 150, 0, "--full-history", $file_name);
 
 	my %latest_commit;
 	my %latest_date;
-- 
1.5.2.3


-- 
-Steven Walter <swalter@lexmark.com>
Next: Jakub Narebski
Message 1 of 5 in “gitweb: Provide RSS feeds for file history”
  1. gitweb: Provide RSS feeds for file historySteven Walter, Aug 3, 2007
  2. Jakub NarebskiAug 3, 2007
  3. gitweb: Fix handling of $file_name in feed generationJakub Narebski, Aug 3, 2007
  4. Junio C HamanoAug 4, 2007
  5. Robert FitzsimonsAug 4, 2007

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.