From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Cc: Sebastian Pipping <sebastian@pipping.org>,
Jakub Narebski <jnareb@gmail.com>
Subject: [PATCH (bugfix)] gitweb: Fix unintended "--no-merges" for regular Atom feed
Date: Wed, 4 Apr 2012 14:25:44 +0200 [thread overview]
Message-ID: <1333542344-20421-1-git-send-email-jnareb@gmail.com> (raw)
In-Reply-To: <4F79D76D.80805@pipping.org>
From: Sebastian Pipping <sebastian@pipping.org>
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>
---
Sebastian Pipping wrote:
> Please excuse that I send the patch as an attachment and consider
> application. Thanks!
Beside sending this patch as an attachement instead of putting it
inline (what was the cause of this?) it was also lacking
Signed-off-by... which I have forged.
I have added explanation of this error in the commit message, and
changed from using '' to undef to get rid of 'opt' / 'extra_options'
parameter instead of having it empty. It is a better way of doing the
reset.
Junio, the bug is very minor, so I don't know if it is worth fixing
for 1.7.10.
gitweb/gitweb.perl | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a8b5fad2..ca6f038 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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 ".
--
1.7.9
next prev parent reply other threads:[~2012-04-04 12:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-02 16:44 [PATCH] Gitweb: Fix unintended "--no-merges" for regular Atom feed Sebastian Pipping
2012-04-04 12:25 ` Jakub Narebski [this message]
2012-04-04 17:47 ` [PATCH (bugfix)] gitweb: " Junio C Hamano
2012-04-04 18:58 ` Jakub Narebski
2012-04-11 15:39 ` Jakub Narebski
2012-04-11 16:48 ` Junio C Hamano
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=1333542344-20421-1-git-send-email-jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=sebastian@pipping.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).