From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] gitweb: protect blob and diff output lines from controls.
Date: Thu, 9 Nov 2006 11:41:41 +0100 [thread overview]
Message-ID: <200611091141.42205.jnareb@gmail.com> (raw)
In-Reply-To: <7v8xiklxh1.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
>> Junio C Hamano wrote:
>>> [...] There is another
>>> thing I noticed while testing it with an artifitial test that I
>>> haven't fixed, but I think you already know about it (when the
>>> commitdiff is completely empty except mode changes, we end up
>>> with unbalanced div). My test's tip can be found at
>>> 'gitweb-test-funny-char' branch temporarily in the git.git
>>> repository.
>>
>> Damn. I thought I corrected this on resend...
>
> I think you need this, otherwise when the last filepair changes
> only metainfo you fail to close the extended header div.
True, I forgot about the situation where empty patch is _last_
in the patchset (which includes the situation when it is _only_
patch).
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 1a757cc..e54a29e 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -2338,6 +2338,8 @@ sub git_patchset_body {
>
> print format_diff_line($patch_line);
> }
> + print "</div>\n" if $in_header; # extended header
I would write '# class="diff extended_header"' here instead.
> +
> print "</div>\n" if $patch_found; # class="patch"
>
> print "</div>\n"; # class="patchset"
Looks good. Ack.
--
Jakub Narebski
next prev parent reply other threads:[~2006-11-09 10:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-08 23:34 [PATCH] gitweb: protect blob and diff output lines from controls Junio C Hamano
2006-11-09 0:04 ` Jakub Narebski
2006-11-09 0:15 ` Junio C Hamano
2006-11-09 0:46 ` Jakub Narebski
2006-11-09 1:10 ` Junio C Hamano
2006-11-09 9:34 ` Jakub Narebski
2006-11-09 9:24 ` Jakub Narebski
2006-11-09 9:55 ` Junio C Hamano
2006-11-09 10:02 ` Jakub Narebski
2006-11-09 10:34 ` Junio C Hamano
2006-11-09 10:41 ` Jakub Narebski [this message]
2006-11-10 10:22 ` Luben Tuikov
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=200611091141.42205.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).