<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/gitweb/gitweb.perl, branch v1.6.3.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v1.6.3.1</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v1.6.3.1'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2009-04-20T10:42:23Z</updated>
<entry>
<title>gitweb: Fix snapshots requested via PATH_INFO</title>
<updated>2009-04-20T10:42:23Z</updated>
<author>
<name>Holger Weiß</name>
<email>holger@zedat.fu-berlin.de</email>
</author>
<published>2009-03-31T16:16:36Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=ccb4b5391382f4cdb5e5be49036e82e7d837b7af'/>
<id>urn:sha1:ccb4b5391382f4cdb5e5be49036e82e7d837b7af</id>
<content type='text'>
Fix the detection of the requested snapshot format, which failed for
PATH_INFO URLs since the references to the hashes which describe the
supported snapshot formats weren't dereferenced appropriately.

Signed-off-by: Holger Weiß &lt;holger@zedat.fu-berlin.de&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: Hyperlink multiple git hashes on the same commit message line</title>
<updated>2009-02-20T06:49:55Z</updated>
<author>
<name>Marcel M. Cary</name>
<email>marcel@oak.homeunix.org</email>
</author>
<published>2009-02-18T03:00:43Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=7d233dea5f4e299fdac8d6cfb610bcd4d60a82b7'/>
<id>urn:sha1:7d233dea5f4e299fdac8d6cfb610bcd4d60a82b7</id>
<content type='text'>
The current implementation only hyperlinks the first hash on
a given line of the commit message.  It seems sensible to
highlight all of them if there are multiple, and it seems
plausible that there would be multiple even with a tidy line
length limit, because they can be abbreviated as short as 8
characters.

Benchmark:

I wanted to make sure that using the 'e' switch to the Perl regex
wasn't going to kill performance, since this is called once per commit
message line displayed.

In all three A/B scenarios I tried, the A and B yielded the same
results within 2%, where A is the version of code before this patch
and B is the version after.

1: View a commit message containing the last 1000 commit hashes
2: View a commit message containing 1000 lines of 40 dots to avoid
   hyperlinking at the same message length
3: View a short merge commit message with a few lines of text and
   no hashes

All were run in CGI mode on my sub-production hardware on a recent
clone of git.git.  Numbers are the average of 10 reqests per second
with the first request discarded, since I expect this change to affect
primarily CPU usage.  Measured with ApacheBench.

Note that the web page rendered was the same; while the new code
supports multiple hashes per line, there was at most one per line.

The primary purpose of scenarios 2 and 3 were to verify that the
addition of 1000 commit messages had an impact on how much of the time
was spent rendering commit messages.  They were all within 2% of 0.80
requests per second (much faster).

So I think the patch has no noticeable effect on performance.

Signed-off-by: Marcel M. Cary &lt;marcel@oak.homeunix.org&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: Fix warnings with override permitted but no repo override</title>
<updated>2009-02-18T18:43:21Z</updated>
<author>
<name>Marcel M. Cary</name>
<email>marcel@oak.homeunix.org</email>
</author>
<published>2009-02-18T13:09:41Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=df5d10a32ebc4f2305e13b70e2c01e4fa2cc73f0'/>
<id>urn:sha1:df5d10a32ebc4f2305e13b70e2c01e4fa2cc73f0</id>
<content type='text'>
When a feature like "blame" is permitted to be overridden in the
repository configuration but it is not actually set in the repository,
a warning is emitted due to the undefined value of the repository
configuration, even though it's a perfectly normal condition.
Emitting warning is grounds for test failure in the gitweb test
script.

This error was caused by rewrite of git_get_project_config from using
"git config [&lt;type&gt;] &lt;name&gt;" for each individual configuration
variable checked to parsing "git config --list --null" output in
commit b201927 (gitweb: Read repo config using 'git config -z -l').
Earlier version of git_get_project_config was returning empty string
if variable do not exist in config; newer version is meant to return
undef in this case, therefore change in feature_bool was needed.

Additionally config_to_* subroutines were meant to be invoked only if
configuration variable exists; therefore we added early return to
git_get_project_config: it now returns no value if variable does not
exists in config.  Otherwise config_to_* subroutines (config_to_bool
in paryicular) wouldn't be able to distinguish between the case where
variable does not exist and the case where variable doesn't have value
(the "[section] noval" case, which evaluates to true for boolean).

While at it fix bug in config_to_bool, where checking if $val is
defined (if config variable has value) was done _after_ stripping
leading and trailing whitespace, which lead to 'Use of uninitialized
value' warning.

Add test case for features overridable but not overriden in repo
config, and case for no value boolean configuration variable.

Signed-off-by: Marcel M. Cary &lt;marcel@oak.homeunix.org&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: fix wrong base URL when non-root DirectoryIndex</title>
<updated>2009-02-17T00:19:07Z</updated>
<author>
<name>Giuseppe Bilotta</name>
<email>giuseppe.bilotta@gmail.com</email>
</author>
<published>2009-02-15T09:18:36Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=81d3fe9f4871e42ebd1af0221fa091fe5476e2f7'/>
<id>urn:sha1:81d3fe9f4871e42ebd1af0221fa091fe5476e2f7</id>
<content type='text'>
CGI::url() has some issues when rebuilding the script URL if the script
is a DirectoryIndex.

One of these issue is the inability to strip PATH_INFO, which is why
we had to do it ourselves.

Another issue is that the resulting URL cannot be used for the &lt;base&gt;
tag: it works if we're the DirectoryIndex at the root level, but not
otherwise.

We fix this by building the proper base URL ourselves, and improve the
comment about the need to strip PATH_INFO manually while we're at it.

Additionally t/t9500-gitweb-standalone-no-errors.sh had to be modified
to set SCRIPT_NAME variable (CGI standard states that it MUST be set,
and now gitweb uses it if PATH_INFO is not empty, as is the case for
some of tests in t9500).

Signed-off-by: Giuseppe Bilotta &lt;giuseppe.bilotta@gmail.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-committag'</title>
<updated>2009-02-15T09:44:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-02-15T09:44:11Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=2a8644c7f163e4b76a36739ba936f8d5d91c3cf4'/>
<id>urn:sha1:2a8644c7f163e4b76a36739ba936f8d5d91c3cf4</id>
<content type='text'>
* jn/gitweb-committag:
  gitweb: Better regexp for SHA-1 committag match
</content>
</entry>
<entry>
<title>Merge branch 'maint'</title>
<updated>2009-02-09T06:07:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-02-09T06:07:53Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=df487baa30924a36ade38ada4f77379236dcce0f'/>
<id>urn:sha1:df487baa30924a36ade38ada4f77379236dcce0f</id>
<content type='text'>
* maint:
  gitweb: add $prevent_xss option to prevent XSS by repository content
  rev-list: fix showing distance when using --bisect-all
</content>
</entry>
<entry>
<title>gitweb: add $prevent_xss option to prevent XSS by repository content</title>
<updated>2009-02-09T05:51:25Z</updated>
<author>
<name>Matt McCutchen</name>
<email>matt@mattmccutchen.net</email>
</author>
<published>2009-02-08T00:00:09Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=7e1100e9e939c9178b2aa3969349e9e8d34488bf'/>
<id>urn:sha1:7e1100e9e939c9178b2aa3969349e9e8d34488bf</id>
<content type='text'>
Add a gitweb configuration variable $prevent_xss that disables features
to prevent content in repositories from launching cross-site scripting
(XSS) attacks in the gitweb domain.  Currently, this option makes gitweb
ignore README.html (a better solution may be worked out in the future)
and serve a blob_plain file of an untrusted type with
"Content-Disposition: attachment", which tells the browser not to show
the file at its original URL.

The XSS prevention is currently off by default.

Signed-off-by: Matt McCutchen &lt;matt@mattmccutchen.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gitweb: Better regexp for SHA-1 committag match</title>
<updated>2009-02-07T20:50:49Z</updated>
<author>
<name>Jakub Narebski</name>
<email>jnareb@gmail.com</email>
</author>
<published>2009-02-06T09:12:41Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=ccb04f99fe3858bae0f06fc7aeefc4d53fec1352'/>
<id>urn:sha1:ccb04f99fe3858bae0f06fc7aeefc4d53fec1352</id>
<content type='text'>
Make SHA-1 regexp to be turned into hyperlink (the SHA-1 committag)
to match word boundary at the beginning and the end.  This way we
reduce number of false matches, for example we now don't match
0x74a5cd01 which is hex decimal (for example memory address),
but is not SHA-1.

Suggested-by: Johannes Schindelin &lt;Johannes.Schindelin@gmx.de&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: align comments to code</title>
<updated>2009-01-31T05:08:49Z</updated>
<author>
<name>Giuseppe Bilotta</name>
<email>giuseppe.bilotta@gmail.com</email>
</author>
<published>2009-01-31T01:31:52Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=41a4d16e200d24b2435148e974b665429931abc9'/>
<id>urn:sha1:41a4d16e200d24b2435148e974b665429931abc9</id>
<content type='text'>
Signed-off-by: Giuseppe Bilotta &lt;giuseppe.bilotta@gmail.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: make static files accessible with PATH_INFO</title>
<updated>2009-01-31T05:08:24Z</updated>
<author>
<name>Giuseppe Bilotta</name>
<email>giuseppe.bilotta@gmail.com</email>
</author>
<published>2009-01-31T01:31:50Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=c3254aeecf89a620db262480a7c424e7607f1e2a'/>
<id>urn:sha1:c3254aeecf89a620db262480a7c424e7607f1e2a</id>
<content type='text'>
Gitweb links to a number of static files such as CSS stylesheets,
favicon or the git logo. When, such as with the default Makefile, the
paths to these files are relative (i.e. doesn't start with a "/"), the
files become inaccessible in any view other tha project list and summary
page if gitweb is invoked with a non-empty PATH_INFO.

Fix this by adding a &lt;base&gt; element pointing to the script's own URL,
which ensure that all relative paths will be resolved correctly.

Signed-off-by: Giuseppe Bilotta &lt;giuseppe.bilotta@gmail.com&gt;
Acked-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
