# [PATCH] git-instaweb: fix mod_perl detection for apache2

5 messages from 2009-08-08 to 2009-08-18. Participants: Mark A Rada, Junio C Hamano, Jakub Narebski.
Thread: https://gitlist.dev/t/20488

## Mark A Rada, 2009-08-08 22:24

Subject: [PATCH] git-instaweb: fix mod_perl detection for apache2
Message-ID: <4C22ECF8-8FBE-4E45-A7CF-EA1203B49AA7@mailservices.uwaterloo.ca>
URL: https://gitlist.dev/e/4C22ECF8-8FBE-4E45-A7CF-EA1203B49AA7%40mailservices.uwaterloo.ca

```
The script was looking for something that matched the '^our $gitbin'
regex, which no longer exists in gitweb.cgi.

Now it looks for 'MOD_PERL', which should be on the line that checks
to see if the script is running in a mod_perl environment.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
---
  git-instaweb.sh |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-instaweb.sh b/git-instaweb.sh
index 32f6496..5f5cac7 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -278,7 +278,7 @@ EOF

  	# check to see if Dennis Stosberg's mod_perl compatibility patch
  	# (<20060621130708.Gcbc6e5c@leonov.stosberg.net>) has been applied
-	if test -f "$module_path/mod_perl.so" && grep '^our $gitbin' \
+	if test -f "$module_path/mod_perl.so" && grep 'MOD_PERL' \
  				"$GIT_DIR/gitweb/gitweb.cgi" >/dev/null
  	then
  		# favor mod_perl if available
-- 
1.6.4

```

## Junio C Hamano, 2009-08-10 01:38

Subject: Re: [PATCH] git-instaweb: fix mod_perl detection for apache2
Message-ID: <7vprb45ty7.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vprb45ty7.fsf%40alter.siamese.dyndns.org
In-Reply-To: <4C22ECF8-8FBE-4E45-A7CF-EA1203B49AA7@mailservices.uwaterloo.ca>

```
Mark A Rada <marada@uwaterloo.ca> writes:

> The script was looking for something that matched the '^our $gitbin'
> regex, which no longer exists in gitweb.cgi.
>
> Now it looks for 'MOD_PERL', which should be on the line that checks
> to see if the script is running in a mod_perl environment.

Thanks.  That sounds like an ancient bug that in turn perhaps suggests
nobody uses instaweb.  Will apply to 'maint'..

```

## Jakub Narebski, 2009-08-10 08:55

Subject: Re: [PATCH] git-instaweb: fix mod_perl detection for apache2
Message-ID: <m3iqgwoxq7.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3iqgwoxq7.fsf%40localhost.localdomain
In-Reply-To: <7vprb45ty7.fsf@alter.siamese.dyndns.org>

```
Junio C Hamano <gitster@pobox.com> writes:

> Mark A Rada <marada@uwaterloo.ca> writes:
> 
> > The script was looking for something that matched the '^our $gitbin'
> > regex, which no longer exists in gitweb.cgi.
> >
> > Now it looks for 'MOD_PERL', which should be on the line that checks
> > to see if the script is running in a mod_perl environment.
> 
> Thanks.  That sounds like an ancient bug that in turn perhaps suggests
> nobody uses instaweb.  Will apply to 'maint'..

Hmmm... taking a peek at current "Git User's Survey 2009" results
http://www.survs.com/shareResults?survey=2PIMZGU0&rndm=678J66QRA2

11. What Git interfaces, implementations, frontends and tools do you
    use?

    git-instaweb  	3%  	77 / 2712

16. How often do you use the following forms of git commands or extra
    git tools?  

    git instaweb 
      never:     1983 - 79%
      rarely:     208 -  8%
      sometimes:   50 -  2% 	
      often:        9 -  0% 	

    Total respondents  	 2506

-- 
Jakub Narebski
Poland
ShadeHawk on #git

```

## Mark A Rada, 2009-08-15 16:09

Subject: Re: [PATCH] git-instaweb: fix mod_perl detection for apache2
Message-ID: <3300D840-9BAB-4233-B949-6A5B300CD9A8@mailservices.uwaterloo.ca>
URL: https://gitlist.dev/e/3300D840-9BAB-4233-B949-6A5B300CD9A8%40mailservices.uwaterloo.ca
In-Reply-To: <m3iqgwoxq7.fsf@localhost.localdomain>

```
Does this means it may be taken off the menu in the not too distant  
future or
deprecated?

--
Mark A Rada (ferrous26)
marada@uwaterloo.ca


On 10-Aug-09, at 4:55 AM, Jakub Narebski wrote:

> Junio C Hamano <gitster@pobox.com> writes:
>
>> Mark A Rada <marada@uwaterloo.ca> writes:
>>
>>> The script was looking for something that matched the '^our $gitbin'
>>> regex, which no longer exists in gitweb.cgi.
>>>
>>> Now it looks for 'MOD_PERL', which should be on the line that checks
>>> to see if the script is running in a mod_perl environment.
>>
>> Thanks.  That sounds like an ancient bug that in turn perhaps  
>> suggests
>> nobody uses instaweb.  Will apply to 'maint'..
>
> Hmmm... taking a peek at current "Git User's Survey 2009" results
> http://www.survs.com/shareResults?survey=2PIMZGU0&rndm=678J66QRA2
>
> 11. What Git interfaces, implementations, frontends and tools do you
>    use?
>
>    git-instaweb  	3%  	77 / 2712
>
> 16. How often do you use the following forms of git commands or extra
>    git tools?
>
>    git instaweb
>      never:     1983 - 79%
>      rarely:     208 -  8%
>      sometimes:   50 -  2% 	
>      often:        9 -  0% 	
>
>    Total respondents  	 2506
>
> -- 
> Jakub Narebski
> Poland
> ShadeHawk on #git
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

```

## Jakub Narebski, 2009-08-18 07:45

Subject: Re: [PATCH] git-instaweb: fix mod_perl detection for apache2
Message-ID: <200908180945.40412.jnareb@gmail.com>
URL: https://gitlist.dev/e/200908180945.40412.jnareb%40gmail.com
In-Reply-To: <3300D840-9BAB-4233-B949-6A5B300CD9A8@mailservices.uwaterloo.ca>

```
On Wed, 15 Aug 2009, Mark A Rada wrote:
> On 10-Aug-09, at 4:55 AM, Jakub Narebski wrote: 
>> Junio C Hamano <gitster@pobox.com> writes:

>>> Thanks.  That sounds like an ancient bug that in turn perhaps  
>>> suggests nobody uses instaweb.  Will apply to 'maint'..
>>
>> Hmmm... taking a peek at current "Git User's Survey 2009" results
>> http://www.survs.com/shareResults?survey=2PIMZGU0&rndm=678J66QRA2
>>
>> 11. What Git interfaces, implementations, frontends and tools do you
>>    use?
>>
>>    git-instaweb  	3%  	77 / 2712
>>
>> 16. How often do you use the following forms of git commands or extra
>>    git tools?
>>
>>    git instaweb
>>      never:     1983 - 79%
>>      rarely:     208 -  8%
>>      sometimes:   50 -  2% 	
>>      often:        9 -  0% 	
>>
>>    Total respondents  	 2506
>>
>
> Does this means it may be taken off the menu in the not too distant  
> future or deprecated?

I don't think so.  We keep git-relink, which almost nobody uses, and
few know what it does.

I guess that git-instaweb is not advertised enough, but that might 
change, as Scott Chacon in "Pro Git" mentions / covers git-instaweb.


P.S. I'd like to create GIT::Web, which would use (contrary to gitweb)
many CPAN modules (and PAR to help installing it with dependencies),
which would use HTTP::Engine (and therefore run as CGI, FastCGI, 
mod_perl and standalone HTTP::Server::Simple), and be similar in 
structure to SVN::Web.  With it using HTTP::Server::Simple git-instaweb 
would be needed less...  But it is in "Duke Nuke Forever" (or 
packv4 ;-) future...

-- 
Jakub Narebski
Poland

```
