Re: Upgrade to gitweb-1.8.3.1-20 on centos7 breaks git access

2019-08-17 Thread Gaiseric Vandal
ndal wrote: I recently applied the latest patches on centos7, including gitweb-1.8.3.1-20. When I try to access git repos (either via web browser or git command line.) Repos are configured to require LDAP authentication. I should be able to access repo ABC via https://myserver.domain.com/git/

Upgrade to gitweb-1.8.3.1-20 on centos7 breaks git access

2019-08-17 Thread Gaiseric Vandal
I recently applied the latest patches on centos7, including gitweb-1.8.3.1-20. When I try to access git repos (either via web browser or git command line.) Repos are configured to require LDAP authentication. I should be able to access repo ABC via https://myserver.domain.com/git/ABC I

Re: How to get gitweb setup with nginx + uwsgi?

2019-08-12 Thread koocr
Hi, On Mon, Aug 12, 2019, at 12:16 PM, Konstantin Ryabitsev wrote: > We have it working in a similar configuration, but with CGit instead of > GitWeb. Unless you have specific requirements to run GitWeb, I recommend > you use CGit for your web frontend, as it offers many featur

Re: How to get gitweb setup with nginx + uwsgi?

2019-08-12 Thread Konstantin Ryabitsev
On Mon, Aug 12, 2019 at 08:09:22AM -0700, ko...@mailc.net wrote: Hi all. I'm setting up a local Git server, with Gitweb + Gitolite. We have it working in a similar configuration, but with CGit instead of GitWeb. Unless you have specific requirements to run GitWeb, I recommend you use

How to get gitweb setup with nginx + uwsgi?

2019-08-12 Thread koocr
Hi all. I'm setting up a local Git server, with Gitweb + Gitolite. The gitolite wrapper is installed & working. Now I'm working on the Gitweb frontend. I run Nginx as my webserver. Usually with PHP, using fpm. Gitweb's gitweb.cgi looks like it needs perl CGI. For perl cg

[PATCH] doc: don't use git.kernel.org as example gitweb URL

2019-06-22 Thread Jakub Wilk
git.kernel.org uses cgit, not gitweb, these days: $ w3m -dump 'http://git.kernel.org/?p=git/git.git;a=tree;f=gitweb' | grep -w generated generated by cgit 1.2-0.3.lf.el7 (git 2.18.0) at 2019-06-22 16:14:38 + Signed-off-by: Jakub Wilk --- Documentation/gitweb.txt | 3 +

Re: on fedora, "man gitweb" exists but actual gitweb command is missing

2019-02-23 Thread Robert P. J. Day
On Sat, 23 Feb 2019, Todd Zullinger wrote: > Hi, > > Robert P. J. Day wrote: > > > > not so much a git issue as what looks like a fedora packaging > > issue. > > Yeah, it's just a minor packaging issue. The gitweb manpages are > included in the m

Re: on fedora, "man gitweb" exists but actual gitweb command is missing

2019-02-23 Thread Todd Zullinger
Hi, Robert P. J. Day wrote: > > not so much a git issue as what looks like a fedora packaging issue. Yeah, it's just a minor packaging issue. The gitweb manpages are included in the main git package rather than in the gitweb package with the rest of the gitweb files. I'

on fedora, "man gitweb" exists but actual gitweb command is missing

2019-02-23 Thread Robert P. J. Day
not so much a git issue as what looks like a fedora packaging issue. on my updated fedora 29 system, "man gitweb" works: GITWEB(1)Git Manual GITWEB(1) NAME gitweb - Git web interface (web frontend to Git repositories) SYNOPSIS

[PATCH v2 35/35] gitweb: make hash size independent

2019-02-18 Thread brian m. carlson
Gitweb has several hard-coded 40 values throughout it to check for values that are passed in or acquired from Git. To simplify the code, introduce a regex variable that matches either exactly 40 or exactly 64 hex characters, and use this variable anywhere we would have previously hard-coded a 40

Re: [PATCH 31/31] gitweb: make hash size independent

2019-02-12 Thread Ævar Arnfjörð Bjarmason
On Tue, Feb 12 2019, brian m. carlson wrote: > Gitweb has several hard-coded 40 values throughout it to check for > values that are passed in or acquired from Git. To simplify the code, > introduce a regex variable that matches either exactly 40 or exactly 64 > hex characters,

[PATCH 31/31] gitweb: make hash size independent

2019-02-11 Thread brian m. carlson
Gitweb has several hard-coded 40 values throughout it to check for values that are passed in or acquired from Git. To simplify the code, introduce a regex variable that matches either exactly 40 or exactly 64 hex characters, and use this variable anywhere we would have previously hard-coded a 40

[PATCH] gitweb: correctly store previous rev in javascript-actions mode

2018-12-16 Thread Jonathan Nieder
lost in the noise. Sorry about that. Hopefully late is better than never. May we forge your sign-off? See https://www.kernel.org/pub/software/scm/git/docs/SubmittingPatches.html#sign-off for more details about what this means. Jakub et al, any thoughts? I don't see any unit tests in gitwe

Re: gitweb: local configuration not found

2018-12-06 Thread Martin Mareš
Hello! > Yeah, it does look indirect. Despite what you said, it also would > support users giving an absolute path via GITWEB_CONFIG. > > With "use File::Spec", perhaps something like this? Yes, this looks right. Martin

Re: gitweb: local configuration not found

2018-12-05 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: >> Documentation says "If you are absolutely certain that you want your >> script to load and execute a file from the current directory, then use >> a ./ prefix". We can do that, like so: >> >> diff --git i/gitweb/Makefi

Re: gitweb: local configuration not found

2018-12-05 Thread Ævar Arnfjörð Bjarmason
On Wed, Dec 05 2018, Jonathan Nieder wrote: > Martin Mares wrote[1]: > >> After upgrade to Stretch, gitweb no longer finds the configuration file >> "gitweb_config.perl" in the current directory. However, "man gitweb" still >> mentions this as one

gitweb: local configuration not found

2018-12-05 Thread Jonathan Nieder
Martin Mares wrote[1]: > After upgrade to Stretch, gitweb no longer finds the configuration file > "gitweb_config.perl" in the current directory. However, "man gitweb" still > mentions this as one of the possible locations of the config file (and > indeed

[PATCH 28/78] config.txt: move gitweb.* to a separate file

2018-10-26 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/config.txt| 17 + Documentation/config/gitweb.txt | 16 2 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 Documentation/config/gitweb.txt diff --git a/Documentation/config.txt b/Do

[PATCH 22/59] config.txt: move gitweb.* to a separate file

2018-10-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/config.txt| 17 + Documentation/gitweb-config.txt | 16 2 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 Documentation/gitweb-config.txt diff --git a/Documentation/config.txt b

Re: gitweb: HTML output is not always encoded in UTF-8 when using --fastcgi.

2018-09-08 Thread Julien Moutinho
Le sam. 08 sept. 2018 à 19:15:32 +0200, Julien Moutinho a écrit : > As a quick workaround this hotpatch can even be put in $GITWEB_CONFIG > by removing the `local` before `*FCGI::Stream::PRINT`. Turns out to require more care than that, due to $per_request_config reloading $GITWEB_CONFIG at each r

gitweb: HTML output is not always encoded in UTF-8 when using --fastcgi.

2018-09-08 Thread Julien Moutinho
ction gitweb v2.18.0 perl v5.28.0 | echo Système >test.git/description According to the 2011 problem report, the problem only appears when using gitweb.cgi --fastcgi not when gitweb.cgi is spawned by fcgiwrap. And apparently, the text must not contain one character which c

Re: gitweb and Levenshtein

2018-07-14 Thread Johannes Schindelin
Hi David, On Thu, 12 Jul 2018, David Brown wrote: > Howdy, I want to hack the getweb_make_index.perl script to create a string > search using: https://github.com/git/git/blob/master/levenshtein.c. > > How do i reference the compiled code? > > I would like to call this routine using Java and may

gitweb and Levenshtein

2018-07-12 Thread David Brown
Howdy, I want to hack the getweb_make_index.perl script to create a string search using: https://github.com/git/git/blob/master/levenshtein.c. How do i reference the compiled code? I would like to call this routine using Java and maybe Perl. Please advise. Thanks. Regards,

Re: [PATCH] gitweb: Measure offsets against UTF-8 flagged string

2018-05-03 Thread Junio C Hamano
Jakub Narebski writes: > I think the problem is not with aligning, otherwise we would simply get > bad aling, and not visible corruption. The ACTUAL PROBLEM is most > probably because of concatenating strings marked as UTF-8 and strings > not marked as UTF-8. Strange things happen then in Perl,

Re: [PATCH] gitweb: Measure offsets against UTF-8 flagged string

2018-05-03 Thread Shin Kojima
> One solution would be to force conversion to UTF-8 on input via "open" > pragma (e.g. "use open ':encoding(UTF-8)';"). But there is no > UTF-8-with_fallback encoding available - we would have to write one, and > install it as module (or fake it via Perl trickery). This mechanism is > almost the

Re: [PATCH] gitweb: Measure offsets against UTF-8 flagged string

2018-05-03 Thread Jakub Narebski
eturn UTF8". The problem with handling encoding in sane way, that is encode it on input (to UTF-8), and decode on output (to plain text or HTML) is the $fallback_encoding. Gitweb assumes that everything uses UTF-8 encoding. If the source is not in UTF-8, but for example uses latin-1

Re: [PATCH] gitweb: Measure offsets against UTF-8 flagged string

2018-05-02 Thread Shin Kojima
ng is a reproduce process: $ git --version git version 2.17.0 $ mkdir test $ cd test $ git init $ echo 'モバイル' | iconv -f UTF-8 -t Shift_JIS > dummy $ git add . $ git commit -m 'init' $ echo 'インスタント' | iconv -f UTF-8 -t Shift_JIS

Re: [PATCH] gitweb: Measure offsets against UTF-8 flagged string

2018-05-02 Thread Junio C Hamano
Shin Kojima writes: > Offset positions should not be counted by byte length, but by actual > character length. > ... > # escape tabs (convert tabs to spaces) > sub untabify { > - my $line = shift; > + my $line = to_utf8(shift); > > while ((my $pos = index($line, "\t")) != -1) {

[PATCH] gitweb: Measure offsets against UTF-8 flagged string

2018-04-30 Thread Shin Kojima
e for using your name here, but the following URL can not find "match" occurances while using `git-instaweb` on the git repository. http://127.0.0.1:1234/?p=.git&a=search&h=HEAD&st=grep&s=Nar%C4%99bski Signed-off-by: Shin Kojima --- gitweb/gitweb.perl | 2 +- 1 fil

[ANNOUNCE] Gitwin: Git Server for Windows with SSH/HTTP(S) transport and Gitweb

2018-04-27 Thread tk
Hi all, This is a ONE-TIME announcement of Gitwin - a Git Server for Windows: Gitwin is a packaging of Git, OpenSSH, Nginx and many other related tools to make it a ready-to-use solution as a secure git repository on Windows. It supports SSH and HTTP(S) transports as well as Gitweb with

Re: Socket activation for GitWeb FastCGI with systemd?

2018-04-04 Thread Alex Ivanov
03.04.2018, 23:04, "Jacob Keller" : > On Tue, Apr 3, 2018 at 11:53 AM, Alex Ivanov wrote: >>  Hi. >>  I want to use systemd as fastcgi spawner for gitweb + nginx. >>  The traffic is low and number of users is limited + traversal bots. For >> that reason

Re: Socket activation for GitWeb FastCGI with systemd?

2018-04-03 Thread Jacob Keller
On Tue, Apr 3, 2018 at 11:53 AM, Alex Ivanov wrote: > Hi. > I want to use systemd as fastcgi spawner for gitweb + nginx. > The traffic is low and number of users is limited + traversal bots. For that > reason I've decided to use following mimimal services > > gitweb.socket

Socket activation for GitWeb FastCGI with systemd?

2018-04-03 Thread Alex Ivanov
Hi. I want to use systemd as fastcgi spawner for gitweb + nginx. The traffic is low and number of users is limited + traversal bots. For that reason I've decided to use following mimimal services gitweb.socket [Unit] Description=GitWeb Socket [Socket] ListenStream=/run/gitweb.sock Accept=

[PATCH v3 04/13] gitweb: hard-depend on the Digest::MD5 5.8 module

2018-03-03 Thread Ævar Arnfjörð Bjarmason
Since my d48b284183 ("perl: bump the required Perl version to 5.8 from 5.6.[21]", 2010-09-24), we've depended on 5.8, so there's no reason to conditionally require Digest::MD5 anymore. It was released with perl v5.7.3[1] The initial introduction of the dependency in e9fd

Re: [PATCH v2 04/13] gitweb: hard-depend on the Digest::MD5 5.8 module

2018-02-25 Thread Eric Sunshine
released with perl > v5.7.3[1] > > The initial introduction of the dependency in > e9fdd74e53 ("gitweb: (gr)avatar support", 2009-06-30) says as much, > this also undoes part of the later 2e9c8789b7 ("gitweb: Mention > optional Perl modules in INSTALL", 2011-02-04) si

[PATCH v2 04/13] gitweb: hard-depend on the Digest::MD5 5.8 module

2018-02-25 Thread Ævar Arnfjörð Bjarmason
Since my d48b284183 ("perl: bump the required Perl version to 5.8 from 5.6.[21]", 2010-09-24), we've depended on 5.8, so there's no reason to conditionally require Digest::MD5 anymore. It was released with perl v5.7.3[1] The initial introduction of the dependency in e9fd

Re: [PATCH 7/8] gitweb: hard-depend on the Digest::MD5 5.8 module

2018-02-14 Thread Jonathan Nieder
Ævar Arnfjörð Bjarmason wrote: > Signed-off-by: Ævar Arnfjörð Bjarmason > --- > gitweb/INSTALL | 3 +-- > gitweb/gitweb.perl | 17 + > 2 files changed, 6 insertions(+), 14 deletions(-) Makes sense, and I like the diffstat. [...] > +++ b/

[PATCH 7/8] gitweb: hard-depend on the Digest::MD5 5.8 module

2018-02-14 Thread Ævar Arnfjörð Bjarmason
Since my d48b284183 ("perl: bump the required Perl version to 5.8 from 5.6.[21]", 2010-09-24), we've depended on 5.8, so there's no reason to conditionally require Digest::MD5 anymore. It was released with perl v5.7.3. The initial introduction of the dependency in e9fdd74e53

Re: [PATCH] gitweb bugfix - check for search permission on sub-directories while scanning project root to prevent program termination

2017-07-18 Thread Junio C Hamano
Hielke Christian Braun writes: > Hi, > > gitweb terminates and shows no project list, if it can not access a > sub-directory in the project root directory. It should show a list of > the projects it can access. Patch corrects this by skipping inaccessible > directories. &

[PATCH] gitweb bugfix - check for search permission on sub-directories while scanning project root to prevent program termination

2017-07-18 Thread Hielke Christian Braun
Hi, gitweb terminates and shows no project list, if it can not access a sub-directory in the project root directory. It should show a list of the projects it can access. Patch corrects this by skipping inaccessible directories. Signed-off-by: Hielke Christian Braun --- gitweb/gitweb.perl

Re: [PATCH 0/2] gitweb: tags feeds

2017-05-07 Thread Giuseppe Bilotta
/git.oblomov.eu/ since, but for some reason I forgot to submit > it for upstreaming.) > > The patchset is also available in the git repository at: > > git://git.oblomov.eu/git gitweb-tags-feed > > ----

[PATCH 1/2] gitweb: infrastructure for tags feed

2017-04-18 Thread Giuseppe Bilotta
Signed-off-by: Giuseppe Bilotta --- gitweb/gitweb.perl | 79 +++--- 1 file changed, 58 insertions(+), 21 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 7cf68f07b7..4adea84006 100755 --- a/gitweb/gitweb.perl +++ b/gitweb

[PATCH 2/2] gitweb: expose tags feed in appropriate places

2017-04-18 Thread Giuseppe Bilotta
Signed-off-by: Giuseppe Bilotta --- gitweb/gitweb.perl | 47 +-- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 4adea84006..8be7444988 100755 --- a/gitweb/gitweb.perl +++ b/gitweb

[PATCH 0/2] gitweb: tags feeds

2017-04-18 Thread Giuseppe Bilotta
patchset is also available in the git repository at: git://git.oblomov.eu/git gitweb-tags-feed Giuseppe Bilotta (2): gitweb: infrastructure for tags feed gitweb: expose tags feed in appropriate places gitweb/gitweb.perl

[PATCH v2 0/2] Minor changes to skip gitweb tests without Time::HiRes

2017-03-01 Thread Ævar Arnfjörð Bjarmason
This was originally just one small patch, but Jakub Narębski pointed out that calling the module "unusable" when we failed to load it was confusing, so now the start of this series is just a rephrasing of an existing error message I copied. Ævar Arnfjörð Bjarmason (2): gitweb tes

Re: [PATCH v2 0/2] Minor changes to skip gitweb tests without Time::HiRes

2017-03-01 Thread Junio C Hamano
Thanks, will replace what has been on 'pu'. Note that I'd dropped a double-SP from the latter one while queuing.

[PATCH v2 1/2] gitweb tests: Change confusing "skip_all" phrasing

2017-03-01 Thread Ævar Arnfjörð Bjarmason
Change the phrasing so that instead of saying that the CGI module is unusable, we say that it's not available. This came up on the git mailing list in <4b34e3a0-3da7-d821-2a7f-9a420ac1d...@gmail.com> from Jakub Narębski. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/gitweb-lib.sh | 2

[PATCH v2 2/2] gitweb tests: Skip tests when we don't have Time::HiRes

2017-03-01 Thread Ævar Arnfjörð Bjarmason
Change the gitweb tests to skip when we can't load the Time::HiRes module. Gitweb needs this module to work. It has been in perl core since v5.8, which is the oldest version we support. However CentOS (and perhaps some other distributions) carve it into its own non-core-perl package that&

Re: [PATCH] gitweb tests: Skip tests when we don't have Time::HiRes

2017-02-27 Thread Ævar Arnfjörð Bjarmason
On Mon, Feb 27, 2017 at 6:48 PM, Jakub Narębski wrote: > W dniu 27.02.2017 o 13:37, Ævar Arnfjörð Bjarmason pisze: >> Change the gitweb tests to skip when we can't load the Time::HiRes >> module. > > Could you tell us in the commit message why this module is needed? &g

Re: [PATCH] gitweb tests: Skip tests when we don't have Time::HiRes

2017-02-27 Thread Jakub Narębski
W dniu 27.02.2017 o 13:37, Ævar Arnfjörð Bjarmason pisze: > Change the gitweb tests to skip when we can't load the Time::HiRes > module. Could you tell us in the commit message why this module is needed? Is it because gitweb loads it unconditionally, or does that at least in

[PATCH] gitweb tests: Skip tests when we don't have Time::HiRes

2017-02-27 Thread Ævar Arnfjörð Bjarmason
Change the gitweb tests to skip when we can't load the Time::HiRes module. This module has bee in perl core since v5.8, which is the oldest version we support, however CentOS (and perhaps some other distributions) carve it into its own non-core-perl package that's not installed along

Re: gitweb html validation

2016-11-18 Thread Ralf Thielow
2016-11-15 19:26 GMT+01:00 Ralf Thielow : Finally I've found the time to actually try this out and there are some problems with it. > > diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl > index 7cf68f07b..33d7c154f 100755 > --- a/gitweb/gitweb.perl > +++ b/gitweb/gitw

Re: gitweb html validation

2016-11-16 Thread Raphaël Gertz
like this perhaps, I didn't test it myself yet. That sounds like a sensible update to me (no, I do not run gitweb myself). Is this the only we have in the UI, or is it the only one that is problematic? There is an other form in the cgi line 4110 : print $cgi->start_form(-m

Re: gitweb html validation

2016-11-15 Thread Junio C Hamano
perhaps, I didn't test it myself yet. That sounds like a sensible update to me (no, I do not run gitweb myself). Is this the only we have in the UI, or is it the only one that is problematic? > diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl > index 7cf68f07b..33d7c154f 100755 >

Re: gitweb html validation

2016-11-15 Thread Ralf Thielow
Raphaël Gertz wrote: > Hi, > > There a small bug in gitweb html validation, you need the following patch to > pass w3c check with searchbox enabled. > > The problem lies in the input directly embed inside a form without a wrapper > which is not valid. > I agree this is

gitweb html validation

2016-11-15 Thread Raphaël Gertz
Hi, There a small bug in gitweb html validation, you need the following patch to pass w3c check with searchbox enabled. The problem lies in the input directly embed inside a form without a wrapper which is not valid. Best regards The following patch fix the issue for git-2.10.2 : --- /usr

Re: Forbid access to /gitweb but authorize the sub projets

2016-11-09 Thread Dennis Kaarsemaker
On Mon, 2016-11-07 at 14:07 +0100, Alexandre Duplaix wrote: > Hello, > > I have several projects under https://myserver/gitweb and I would like > to forbid the access to the root, so that the users can't list the > differents projects. > > However, I need to let the

Forbid access to /gitweb but authorize the sub projets

2016-11-07 Thread Alexandre Duplaix
Hello, I have several projects under https://myserver/gitweb and I would like to forbid the access to the root, so that the users can't list the differents projects. However, I need to let the access to the sub projects (ex: https://myserver/gitweb/?p=project1;a=summary How can

Re: [PATCH v2 2/3] gitweb: Link to 7-char+ SHA1s, not only 8-char+

2016-10-17 Thread Ævar Arnfjörð Bjarmason
I did that already myself while queuing. Could you fetch > what I queued on 'pu' to double check? Thanks, looked at it, looks good to me! > I think the diff between what was posted and what is queued (I just > checked) looks like this: > > -gitweb: Link to 7-char+ SHA1

Re: [PATCH v2 2/3] gitweb: Link to 7-char+ SHA1s, not only 8-char+

2016-10-17 Thread Junio C Hamano
;pu' to double check? I think the diff between what was posted and what is queued (I just checked) looks like this: -gitweb: Link to 7-char+ SHA1s, not only 8-char+ +gitweb: link to 7-char+ SHA-1s, not only 8-char+ Change the minimum length of an abbreviated object identifier in the commit mess

Re: [PATCH v2 2/3] gitweb: Link to 7-char+ SHA1s, not only 8-char+

2016-10-15 Thread Ævar Arnfjörð Bjarmason
sed to just [0-9a-f], that dates back to the initial >>> version of gitweb from 161332a ("first working version", >>> 2005-08-07). Git will accept all-caps SHA1s, but didn't ever produce >>> them as far as I can tell. >> >> All right. If we decide t

Re: [PATCH v2 3/3] gitweb: Link to "git describe"'d commits in log messages

2016-10-14 Thread Jakub Narębski
is regex. It's important to cover most common cases occurring naturally in people's repositories, while trying to avoid false positives (the latter is important more now, where gitweb doesn't check for rev name validity). I guess that most common is to use non-hierarchical tags with ASCII-on

Re: [PATCH v2 3/3] gitweb: Link to "git describe"'d commits in log messages

2016-10-14 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > I just ran into an example of a better reason for doing it like my > patch is doing, which is that if you have some tag like: > > deployment-20160928-171914-16-g42e13d8 > > With my patch the whole thing will be a link to the 42e13d8 commit, > but with this sugges

Re: [PATCH v2 2/3] gitweb: Link to 7-char+ SHA1s, not only 8-char+

2016-10-14 Thread Junio C Hamano
Jakub Narębski writes: > s/SHA1/SHA-1/g in above paragraph (for correctness and consistency). >> >> I think it's fairly dubious to link to things matching [0-9a-fA-F] >> here as opposed to just [0-9a-f], that dates back to the initial >> version of gitweb from

Re: [PATCH v2 3/3] gitweb: Link to "git describe"'d commits in log messages

2016-10-14 Thread Ævar Arnfjörð Bjarmason
e a rather futile exercise given that this is free text, and it >>> would be prohibitively expensive to look up whether the references in >>> question exist in our repository. >>> >>> There was on-list discussion about how we could do better than this

Re: [PATCH v2 2/3] gitweb: Link to 7-char+ SHA1s, not only 8-char+

2016-10-14 Thread Jakub Narębski
W dniu 06.10.2016 o 11:11, Ævar Arnfjörð Bjarmason pisze: > Change the minimum length of an abbreviated object identifier in the > commit message gitweb tries to turn into link from 8 hexchars to 7. > > This arbitrary minimum length of 8 was introduced in bfe2191 ("gitweb: >

Re: [PATCH v2 1/3] gitweb: Fix a typo in a comment

2016-10-14 Thread Jakub Narębski
W dniu 06.10.2016 o 11:11, Ævar Arnfjörð Bjarmason napisał: > Change a typo'd MIME type in a comment. The Content-Type is > application/xhtml+xml, not application/xhtm+xml. > > Fixes up code originally added in 53c4031 ("gitweb: Strip > non-printable characters from

Re: [PATCH v2 3/3] gitweb: Link to "git describe"'d commits in log messages

2016-10-09 Thread Ævar Arnfjörð Bjarmason
case of sticking "git describe" output into commit >> messages without trying to link to all possible refnames, that's going >> to be a rather futile exercise given that this is free text, and it >> would be prohibitively expensive to look up whether the references

Re: [PATCH v2 3/3] gitweb: Link to "git describe"'d commits in log messages

2016-10-06 Thread Junio C Hamano
ory. > > There was on-list discussion about how we could do better than this > patch. Junio suggested to update parse_commits() to call a new > "gitweb--helper" command which would pass each of the revision > candidates through "rev-parse --verify --quiet". T

Re: [PATCH v2 2/3] gitweb: Link to 7-char+ SHA1s, not only 8-char+

2016-10-06 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Change the minimum length of an abbreviated object identifier in the > commit message gitweb tries to turn into link from 8 hexchars to 7. > > This arbitrary minimum length of 8 was introduced in bfe2191 ("gitweb: > SHA-1 in commit log mess

[PATCH v2 2/3] gitweb: Link to 7-char+ SHA1s, not only 8-char+

2016-10-06 Thread Ævar Arnfjörð Bjarmason
Change the minimum length of an abbreviated object identifier in the commit message gitweb tries to turn into link from 8 hexchars to 7. This arbitrary minimum length of 8 was introduced in bfe2191 ("gitweb: SHA-1 in commit log message links to "object" view", 2006-12-

[PATCH v2 0/3] gitweb: Be smarter about linking to SHA1s in log messages

2016-10-06 Thread Ævar Arnfjörð Bjarmason
This is v2 of patches I sent on September 21st starting at <20160921114428.28664-1-ava...@gmail.com>. Jakub Narębski had a lot of feedback for that series (thanks!). Which as far as I can tell I've incorporated entirely in this re-roll. Ævar Arnfjörð Bjarmason (3): gitweb: Fix

[PATCH v2 1/3] gitweb: Fix a typo in a comment

2016-10-06 Thread Ævar Arnfjörð Bjarmason
Change a typo'd MIME type in a comment. The Content-Type is application/xhtml+xml, not application/xhtm+xml. Fixes up code originally added in 53c4031 ("gitweb: Strip non-printable characters from syntax highlighter output", 2011-09-16). Signed-off-by: Ævar Arnfjörð Bjarmas

[PATCH v2 3/3] gitweb: Link to "git describe"'d commits in log messages

2016-10-06 Thread Ævar Arnfjörð Bjarmason
tory. There was on-list discussion about how we could do better than this patch. Junio suggested to update parse_commits() to call a new "gitweb--helper" command which would pass each of the revision candidates through "rev-parse --verify --quiet". That would cut down on our f

Re: [PATCH v4 2/2] gitweb: use highlight's shebang detection

2016-09-28 Thread Ian Kelling
On Sun, Sep 25, 2016, at 11:04 AM, Jakub Narębski wrote: > > For what it is worth it: > > Acked-by: Jakub Narębski > > (but unfortunately *not* tested by). Thank you for all your help. -- Ian Kelling

Re: [PATCH v4 2/2] gitweb: use highlight's shebang detection

2016-09-25 Thread Jakub Narębski
syntax is not known by gitweb. In that case, pass the blob > contents to "highlight --force"; the parameter is needed to make it > always generate HTML output (which includes HTML-escaping). > > Although we now run highlight on files which do not end up highlighted, > perf

Re: [PATCH v4 1/2] gitweb: remove unused guess_file_syntax() parameter

2016-09-25 Thread Jakub Narębski
W dniu 25.09.2016 o 00:32, Ian Kelling pisze: > Subject: gitweb: remove unused guess_file_syntax() parameter > > Signed-off-by: Ian Kelling Acked-by: Jakub Narębski > --- > > Notes: > The only change from v3 is a more descriptive commit message > > gitweb/git

Re: [PATCH v3 2/2] gitweb: use highlight's shebang detection

2016-09-24 Thread Ian Kelling
On Sat, Sep 24, 2016, at 09:21 AM, Jakub Narębski wrote: > W dniu 24.09.2016 o 00:15, Jakub Narębski pisze: > > Sidenote: this way of benchmarking of gitweb falls between two ways of > doing a benchmark. > > The first method is to simply run gitweb as a standalone scr

Re: [PATCH v3 2/2] gitweb: use highlight's shebang detection

2016-09-24 Thread Ian Kelling
> for some scripting languages. Make use of this autodetection for files > > which syntax is not known by gitweb. In that case, pass the blob > > contents to "highlight --force"; the parameter is needed to make it > > always generate HTML output (which includes HTML-es

[PATCH v4 2/2] gitweb: use highlight's shebang detection

2016-09-24 Thread Ian Kelling
The "highlight" binary can, in some cases, determine the language type by the means of file contents, for example the shebang in the first line for some scripting languages. Make use of this autodetection for files which syntax is not known by gitweb. In that case, pass the blob c

[PATCH v4 1/2] gitweb: remove unused guess_file_syntax() parameter

2016-09-24 Thread Ian Kelling
Signed-off-by: Ian Kelling --- Notes: The only change from v3 is a more descriptive commit message gitweb/gitweb.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 33d701d..6cb4280 100755 --- a/gitweb/gitweb.perl +++ b

Re: [PATCH v3 2/2] gitweb: use highlight's shebang detection

2016-09-24 Thread Junio C Hamano
Jakub Narębski writes: >> Also, "curling" is not the word I would like to see. I would say: >> >> Simple benchmark comparing performance of 'blob' view of files without >> syntax highlighting in gitweb before and after this change indicates >

Re: [PATCH v3 2/2] gitweb: use highlight's shebang detection

2016-09-24 Thread Jakub Narębski
t's logs indicate +-1% difference in >> request time for all file types. > > Also, "curling" is not the word I would like to see. I would say: > > Simple benchmark comparing performance of 'blob' view of files without > syntax highlighting in

Re: [PATCH v3 2/2] gitweb: use highlight's shebang detection

2016-09-23 Thread Jakub Narębski
ch syntax is not known by gitweb. In that case, pass the blob > contents to "highlight --force"; the parameter is needed to make it > always generate HTML output (which includes HTML-escaping). Right. > > Although we now run highlight on files which do not end up highli

Re: [PATCH v3 1/2] gitweb: remove unused function parameter

2016-09-23 Thread Junio C Hamano
Jakub Narębski writes: > I think it would be better to be more descriptive, and say: > > Subject: [PATCH v3 1/2] gitweb: remove unused parameter from > guess_file_syntax() > Acked-by: Jakub Narębski Thanks.

Re: [PATCH v3 1/2] gitweb: remove unused function parameter

2016-09-23 Thread Jakub Narębski
W dniu 23.09.2016 o 11:08, Ian Kelling napisał: > > Subject: [PATCH v3 1/2] gitweb: remove unused function parameter I think it would be better to be more descriptive, and say: Subject: [PATCH v3 1/2] gitweb: remove unused parameter from guess_file_syntax() But that might be to

Re: [PATCH v2] gitweb: use highlight's shebang detection

2016-09-23 Thread Ian Kelling
by the means of file contents, for example the shebang in the first > line > for some scripting languages. Make use of this autodetection for files > which syntax is not known by gitweb. In that case, pass the blob > contents to "highlight --force"; the paramete

[PATCH v3 2/2] gitweb: use highlight's shebang detection

2016-09-23 Thread Ian Kelling
The "highlight" binary can, in some cases, determine the language type by the means of file contents, for example the shebang in the first line for some scripting languages. Make use of this autodetection for files which syntax is not known by gitweb. In that case, pass the blob c

[PATCH v3 1/2] gitweb: remove unused function parameter

2016-09-23 Thread Ian Kelling
Signed-off-by: Ian Kelling --- gitweb/gitweb.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 33d701d..6cb4280 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3913,7 +3913,7 @@ sub blob_contenttype { # guess

Re: [PATCH v2] gitweb: use highlight's shebang detection

2016-09-22 Thread Jakub Narębski
. Make use of this autodetection for files which syntax is not known by gitweb. In that case, pass the blob contents to "highlight --force"; the parameter is needed to make it always generate HTML output (which includes HTML-escaping). Also, we might want to have the information a

Re: [PATCH] gitweb: use highlight's shebang detection

2016-09-21 Thread Ian Kelling
fyi: I mistakenly did not include v2 in the subject of the last message.

[PATCH] gitweb: use highlight's shebang detection

2016-09-21 Thread Ian Kelling
improve syntax highlight documentation, add test to ensure gitweb doesn't crash when language detection is used, and remove an unused parameter from gitweb_check_feature(). Signed-off-by: Ian Kelling --- Documentation/gitweb.conf.txt | 21 ++++++--- gitweb/gitweb.perl

Re: [PATCH] gitweb: use highlight's shebang detection

2016-09-21 Thread Ian Kelling
/highlight.php Search for the word shebang, it's mentioned twice. > > If this feature is available only for some version, or for some > highlighters, gitweb would have to provide an option to configure > it. It might be an additional configuration variable, it might > be a special v

Re: [PATCH 2/3] gitweb: Link to 7-character SHA1SUMS in commit messages

2016-09-21 Thread Ævar Arnfjörð Bjarmason
n it's usually faster. >> >> But OTOH I think perhaps we're worrying about nothing when it comes to >> the performance. I haven't been able to make gitweb display more than >> a 100 or so commits at a time (haven't found where exactly in the code >>

Re: [PATCH 3/3] gitweb: Link to "git describe"'d commits in log messages

2016-09-21 Thread Jakub Narębski
W dniu 21.09.2016 o 19:58, Ævar Arnfjörð Bjarmason pisze: > On Wed, Sep 21, 2016 at 7:09 PM, Jakub Narębski wrote: >> W dniu 21.09.2016 o 13:44, Ævar Arnfjörð Bjarmason napisał: >>> +(?>> +[A-Za-z0-9.-]+ >>> +(?!\.) # refs can't end with ".", see check_refname_

Re: [PATCH 2/3] gitweb: Link to 7-character SHA1SUMS in commit messages

2016-09-21 Thread Jakub Narębski
W dniu 21.09.2016 o 20:04, Ævar Arnfjörð Bjarmason pisze: > On Wed, Sep 21, 2016 at 6:26 PM, Jakub Narębski wrote: > >> P.S. I have reworking of commit message parsing and enhancement in my >> long, long and dated gitweb TODO list :-( > > Anything specific you could shar

Re: [PATCH 2/3] gitweb: Link to 7-character SHA1SUMS in commit messages

2016-09-21 Thread Ævar Arnfjörð Bjarmason
On Wed, Sep 21, 2016 at 6:26 PM, Jakub Narębski wrote: > P.S. I have reworking of commit message parsing and enhancement in my > long, long and dated gitweb TODO list :-( Anything specific you could share? One thing that would be a lot faster in Perl is if we didn't have to pass the

Re: [PATCH 3/3] gitweb: Link to "git describe"'d commits in log messages

2016-09-21 Thread Junio C Hamano
(and unresolving > links) and performance... Yes, and that is why I asked a simple yes-or-no question. Would it be too expensive? Your answer seems to be yes. Have we measured? Is that really a bottleneck? Would it help to update parse_commits to call a new command "gitweb--helper" that

Re: [PATCH 3/3] gitweb: Link to "git describe"'d commits in log messages

2016-09-21 Thread Ævar Arnfjörð Bjarmason
): > > If you want to reference a previous commit in the history of a stable > branch, use the format "abbreviated sha1 (subject, date)", > with the subject enclosed in a pair of double-quotes, like this: > > Commit f86a374 ("pack-bitmap.c: fix a memleak

Re: [PATCH] gitweb: use highlight's shebang detection

2016-09-21 Thread Jakub Narębski
W dniu 21.09.2016 o 18:38, Junio C Hamano pisze: > Jakub Narębski writes: >> W dniu 06.09.2016 o 21:00, Ian Kelling pisze: >> >>> The highlight binary can detect language by shebang when we can't tell >>> the syntax type by the name of the file. >> >> Was it something always present among highlig

  1   2   3   4   5   6   >