<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/gitweb/gitweb.perl, branch v1.7.8.2</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.8.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.8.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2011-10-26T23:16:31Z</updated>
<entry>
<title>Merge branch 'lh/gitweb-site-html-head'</title>
<updated>2011-10-26T23:16:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-10-26T23:16:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=208a1cc3d37f7c0f770440095fd3fa621f3ce006'/>
<id>urn:sha1:208a1cc3d37f7c0f770440095fd3fa621f3ce006</id>
<content type='text'>
* lh/gitweb-site-html-head:
  gitweb: provide a way to customize html headers
</content>
</entry>
<entry>
<title>Merge branch 'jm/maint-gitweb-filter-forks-fix'</title>
<updated>2011-10-26T23:16:30Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-10-26T23:16:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=aface4c3904de688ced9cecad4ac07bc3afeec8f'/>
<id>urn:sha1:aface4c3904de688ced9cecad4ac07bc3afeec8f</id>
<content type='text'>
* jm/maint-gitweb-filter-forks-fix:
  gitweb: fix regression when filtering out forks
</content>
</entry>
<entry>
<title>gitweb: fix regression when filtering out forks</title>
<updated>2011-10-21T21:46:38Z</updated>
<author>
<name>Julien Muchembled</name>
<email>jm@jmuchemb.eu</email>
</author>
<published>2011-10-21T19:04:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=53c632faab0be2e8510a678a4b7dfa01dc7f41e1'/>
<id>urn:sha1:53c632faab0be2e8510a678a4b7dfa01dc7f41e1</id>
<content type='text'>
This fixes a condition in filter_forks_from_projects_list that failed if
process directory was different from project root: in such case, the subroutine
was a no-op and forks were not detected.

Signed-off-by: Julien Muchembled &lt;jm@jmuchemb.eu&gt;
Tested-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gitweb: provide a way to customize html headers</title>
<updated>2011-10-21T17:18:37Z</updated>
<author>
<name>Lénaïc Huard</name>
<email>lenaic@lhuard.fr.eu.org</email>
</author>
<published>2011-10-21T07:09:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c1355b7ffb6573ff7c76aef7d3bab664fb895dc8'/>
<id>urn:sha1:c1355b7ffb6573ff7c76aef7d3bab664fb895dc8</id>
<content type='text'>
This allows web sites to add some specific html headers to the pages
generated by gitweb.

The new variable $site_html_head_string can be set to an html snippet that
will be inserted at the end of the &lt;head&gt; section of each page generated
by gitweb.

Signed-off-by: LÃ©naÃ¯c Huard &lt;lenaic@lhuard.fr.eu.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gitweb: Strip non-printable characters from syntax highlighter output</title>
<updated>2011-09-16T16:22:47Z</updated>
<author>
<name>Jakub Narebski</name>
<email>jnareb@gmail.com</email>
</author>
<published>2011-09-16T12:41:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=0866786b80aa921576ab4e7474c91207111f970f'/>
<id>urn:sha1:0866786b80aa921576ab4e7474c91207111f970f</id>
<content type='text'>
The current code, as is, passes control characters, such as form-feed
(^L) to highlight which then passes it through to the browser.  User
agents (web browsers) that support 'application/xhtml+xml' usually
require that web pages declared as XHTML and with this mimetype are
well-formed XML.  Unescaped control characters cannot appear within a
contents of a valid XML document.

This will cause the browser to display one of the following warnings:

* Safari v5.1 (6534.50) &amp; Google Chrome v13.0.782.112:

   This page contains the following errors:

   error on line 657 at column 38: PCDATA invalid Char value 12
   Below is a rendering of the page up to the first error.

* Mozilla Firefox 3.6.19 &amp; Mozilla Firefox 5.0:

   XML Parsing Error: not well-formed
   Location:
   http://path/to/git/repo/blah/blah

Both errors were generated by gitweb.perl v1.7.3.4 w/ highlight 2.7
using arch/ia64/kernel/unwind.c from the Linux kernel.

When syntax highlighter is not used, control characters are replaced
by esc_html(), but with syntax highlighter they were passed through to
browser (to_utf8() doesn't remove control characters).

Introduce sanitize() subroutine which strips forbidden characters, but
does not perform HTML escaping, and use it in git_blob() to sanitize
syntax highlighter output for XHTML.

Note that excluding "\t" (U+0009), "\n" (U+000A) and "\r" (U+000D) is
not strictly necessary, atleast for currently the only callsite: "\t"
tabs are replaced by spaces by untabify(), "\n" is stripped from each
line before processing it, and replacing "\r" could be considered
improvement.

Originally-by: Christopher M. Fuhrman &lt;cfuhrman@panix.com&gt;
Signed-off-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jn/gitweb-config-list-case'</title>
<updated>2011-08-08T19:33:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-08-08T19:33:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2728139a627dced09d47ec6927d4e8cf1dddc7d6'/>
<id>urn:sha1:2728139a627dced09d47ec6927d4e8cf1dddc7d6</id>
<content type='text'>
* jn/gitweb-config-list-case:
  gitweb: Git config keys are case insensitive, make config search too
</content>
</entry>
<entry>
<title>Merge branch 'jn/gitweb-system-config'</title>
<updated>2011-08-08T19:33:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-08-08T19:33:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=86bd7f99892238d36c62c18477ea360037ac19dc'/>
<id>urn:sha1:86bd7f99892238d36c62c18477ea360037ac19dc</id>
<content type='text'>
* jn/gitweb-system-config:
  gitweb: Introduce common system-wide settings for convenience
</content>
</entry>
<entry>
<title>gitweb: pass string after encoding in utf-8 to syntax highlighter</title>
<updated>2011-08-04T19:13:38Z</updated>
<author>
<name>张忠山</name>
<email>zzs213@126.com</email>
</author>
<published>2011-08-04T15:52:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=927cd1fc940f7b588521b388aeb610ab3890399e'/>
<id>urn:sha1:927cd1fc940f7b588521b388aeb610ab3890399e</id>
<content type='text'>
Otherwise the highlight filter would work on a corrupt byte sequence.

Signed-off-by: 张忠山 &lt;zzs213@126.com&gt;
Acked-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gitweb: Git config keys are case insensitive, make config search too</title>
<updated>2011-08-01T01:39:19Z</updated>
<author>
<name>Jakub Narebski</name>
<email>jnareb@gmail.com</email>
</author>
<published>2011-07-28T21:38:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=14569cd810ad35a66ca7867505e0b2dd202ab95f'/>
<id>urn:sha1:14569cd810ad35a66ca7867505e0b2dd202ab95f</id>
<content type='text'>
"git config -z -l" that gitweb uses in git_parse_project_config() to
populate %config hash returns section and key names of config
variables in lowercase (they are case insensitive).  When checking
%config in git_get_project_config() we have to take it into account.

Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gitweb: Introduce common system-wide settings for convenience</title>
<updated>2011-07-24T23:22:21Z</updated>
<author>
<name>Jakub Narebski</name>
<email>jnareb@gmail.com</email>
</author>
<published>2011-07-24T22:29:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=131d6afcba657f9348031ee2e20f62d25d69ce7a'/>
<id>urn:sha1:131d6afcba657f9348031ee2e20f62d25d69ce7a</id>
<content type='text'>
Because of backward compatibility we cannot change gitweb to always
use /etc/gitweb.conf (i.e. even if gitweb_config.perl exists).  For
common system-wide settings we therefore need separate configuration
file: /etc/gitweb-common.conf.

Long description:

gitweb currently obtains configuration from the following sources:

  1. per-instance configuration file (default: gitweb_conf.perl)
  2. system-wide configuration file (default: /etc/gitweb.conf)

If per-instance configuration file exists, then system-wide
configuration is _not used at all_.  This is quite untypical and
suprising behavior.

Moreover it is different from way git itself treats /etc/git.conf.  It
reads in stuff from /etc/git.conf and then local repos can change or
override things as needed.  In fact this is quite beneficial, because
it gives site admins a simple and easy way to give an automatic hint
to a repo about things the admin would like.

On the other hand changing current behavior may lead to the situation,
where something in /etc/gitweb.conf may interfere with unintended
interaction in the local repository.  One solution would be to
_require_ to do explicit include; with read_config_file() it is now
easy, as described in gitweb/README (description introduced in this
commit).

But as J.H. noticed we cannot ask people to modify their per-instance
gitweb config file to include system-wide settings, nor we can require
them to do this.

Therefore, as proposed by Junio, for gitweb to have centralized config
elements while retaining backwards compatibility, introduce separate
common system-wide configuration file, by default /etc/gitweb-common.conf

Noticed-by: Drew Northup &lt;drew.northup@maine.edu&gt;
Helped-by: John 'Warthog9' Hawley &lt;warthog9@kernel.org&gt;
Inspired-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
