From: Jakub Narebski <jnareb@gmail.com>
To: Steven Walter <stevenrwalter@gmail.com>
Cc: git@vger.kernel.org, Robert Fitzsimons <robfitz@273k.net>
Subject: Re: [PATCH] gitweb: Provide RSS feeds for file history
Date: Fri, 3 Aug 2007 11:10:55 +0200 [thread overview]
Message-ID: <200708031110.55969.jnareb@gmail.com> (raw)
In-Reply-To: <20070803020555.GB8593@dervierte>
Steven Walter wrote:
Nak. Explanation below. Corrected patch will follow.
> 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.
This is a bug introduced while changing gitweb (among others git_feed
subroutine) to use parse_commits, in commit b6093a5c. Earlier it worked.
So the explanation (in commit message) is not full.
By the way it affects not only RSS but also Atom feeds.
Documentation/SubmittingPatches:
Checklist (and a short version for the impatient):
Commits:
[...]
- if you want your work included in git.git, add a
"Signed-off-by: Your Name <your@email.com>" line to the
commit message (or just use the option "-s" when
committing) to confirm that you agree to the Developer's
Certificate of Origin
> ---
> 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) {
This is a big, intrusive change. It makes 'file_name' default argument,
unless overriden. While it made sense for 'project' parameter, as almost
all URLs in gitweb needed it, more than half URLs does not need 'file_name'
parameter. And some of those URLs are present in a views which do use
'file_name'.
If you wanted alternative URLs for a feed preserve 'file_name' parameter,
do it explicitely.
> @@ -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;
I'd rather not use "--full-history" for feeds. We use it in the 'history'
view for backward compatibility reasons; I'd rather leave it for extra
options in the feed.
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2007-08-03 9:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-03 2:05 [PATCH] gitweb: Provide RSS feeds for file history Steven Walter
2007-08-03 9:10 ` Jakub Narebski [this message]
2007-08-03 17:50 ` [PATCH] gitweb: Fix handling of $file_name in feed generation Jakub Narebski
2007-08-04 0:25 ` Junio C Hamano
2007-08-04 0:27 ` Robert Fitzsimons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200708031110.55969.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=robfitz@273k.net \
--cc=stevenrwalter@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.