Re: [PATCH v2] gitweb: use Git.pm, and use its parse_rev method for git_get_head_hash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lea Wiemann <lewiemann@xxxxxxxxx> writes:

> This simplifies git_get_head_hash a lot; the method might eventually
> even go away.
>
> I haven't checked whether this causes an IO performance regression by
> instantiating a new Git repository instance, but in the end
> Git->repository will be as fast as possible and do no eager disk
> accesses.  No benchmarking yet at this stage.
>
> Signed-off-by: Lea Wiemann <LeWiemann@xxxxxxxxx>

With this on top of your parse_rev patch (I used v2 but I do not think v3
changes the situation in any way), you seem to have broken t9500.

gitweb.log left in the trash directory says that it cannot find Git.pm in
@INC.  I suspect that you are not using your own Git in the build tree in
your test, but an already installed one.

Please make sure that you are testing with Git.pm that you are shipping.
A good way to do so would be to add a deliberate error in perl/Git.pm to
cause loading of the module to fail, and make sure test barfs upon "use
Git".

Something like this is needed on top of your patch, I think.

---

 t/t9500-gitweb-standalone-no-errors.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index ae7082b..a62231f 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -47,8 +47,9 @@ gitweb_run () {
 	PATH_INFO=""$2""
 	export GATEWAY_INTERFACE HTTP_ACCEPT REQUEST_METHOD QUERY_STRING PATH_INFO
 
+	PERL5LIB=$(pwd)/../../perl/blib/lib
 	GITWEB_CONFIG=$(pwd)/gitweb_config.perl
-	export GITWEB_CONFIG
+	export GITWEB_CONFIG PERL5LIB
 
 	# some of git commands write to STDERR on error, but this is not
 	# written to web server logs, so we are not interested in that:
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux