Skip to content

Commit

Permalink
gitweb: Fix unintended "--no-merges" for regular Atom feed
Browse files Browse the repository at this point in the history
The print_feed_meta() subroutine generates links for feeds with and
without merges, in RSS and Atom formats.  However because %href_params
was not properly reset, it generated links with "--no-merges" for all
except the very first link.

Before:
<link rel="alternate" title="[..] - Atom feed" href="/?p=.git;a=atom;opt=--no-merges" type="application/atom+xml" />
<link rel="alternate" title="[..] - Atom feed (no merges)" href="/?p=.git;a=atom;opt=--no-merges" type="application/atom+xml" />

After:
<link rel="alternate" title="[..] - Atom feed" href="/?p=.git;a=atom" type="application/atom+xml" />
<link rel="alternate" title="[..] - Atom feed (no merges)" href="/?p=.git;a=atom;opt=--no-merges" type="application/atom+xml" />

Signed-off-by: Sebastian Pipping <sebastian@pipping.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Sebastian Pipping authored and Junio C Hamano committed Apr 11, 2012
1 parent 7945c7f commit cc999a3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -3886,6 +3886,7 @@ sub print_feed_meta {
'-type' => "application/$type+xml"
);

$href_params{'extra_options'} = undef;
$href_params{'action'} = $type;
$link_attr{'-href'} = href(%href_params);
print "<link ".
Expand Down

0 comments on commit cc999a3

Please sign in to comment.