Git development
 help / color / mirror / Atom feed
* Re: [PATCH] Eliminate Scalar::Util usage from private-Error.pm
From: Johannes Schindelin @ 2006-07-26  2:03 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Junio C Hamano, git
In-Reply-To: <Pine.LNX.4.63.0607260356480.29667@wbgn013.biozentrum.uni-wuerzburg.de>

Hi,

On Wed, 26 Jul 2006, Johannes Schindelin wrote:

> - private_Error.pm is not used. I had to rename it for Error.pm to be
>   picked up.

Never mind. After I finally got the GITPERLLIB thing right, it did pick 
Error.pm up.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] Eliminate Scalar::Util usage from private-Error.pm
From: Petr Baudis @ 2006-07-26  2:10 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Junio C Hamano, git
In-Reply-To: <Pine.LNX.4.63.0607260356480.29667@wbgn013.biozentrum.uni-wuerzburg.de>

  Hi,

Dear diary, on Wed, Jul 26, 2006 at 04:01:03AM CEST, I got a letter
where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
> After a lot of fiddling, it works here. Remarks:

  thanks for the testing!

> - It is not at all easy to run git (Perl scripts) in-place. At least for 
>   Python, you can set a variable in config.mak and be done with it.

  Does setting prefix to the same directory as where your Git tree is
help?  (If so, we might want to document it.)

> - private_Error.pm is not used. I had to rename it for Error.pm to be
>   picked up.

  Hmm, yes, I guess it is copied in place only during the installation.
We might add something like

	all:
		cp private-Error.pm blib/lib/Error.pm

to the perl/Makefile. Opinions?

> - It even passes t7001 now. _After_ I spent two hours rewriting it in C.

  Thanks for the patience - I hope we will finally get all the remaining
Perl problems sorted out.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam

^ permalink raw reply

* Re: [PATCH] Eliminate Scalar::Util usage from private-Error.pm
From: Petr Baudis @ 2006-07-26  2:11 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Junio C Hamano, git
In-Reply-To: <Pine.LNX.4.63.0607260402460.29667@wbgn013.biozentrum.uni-wuerzburg.de>

  Hi,

Dear diary, on Wed, Jul 26, 2006 at 04:03:32AM CEST, I got a letter
where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
> On Wed, 26 Jul 2006, Johannes Schindelin wrote:
> 
> > - private_Error.pm is not used. I had to rename it for Error.pm to be
> >   picked up.
> 
> Never mind. After I finally got the GITPERLLIB thing right, it did pick 
> Error.pm up.

  cool. How did you tweak it?

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam

^ permalink raw reply

* Re: [PATCH] Eliminate Scalar::Util usage from private-Error.pm
From: Petr Baudis @ 2006-07-26  2:15 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Randal L.Schwartz
In-Reply-To: <7vhd15cfaj.fsf@assigned-by-dhcp.cox.net>

Dear diary, on Wed, Jul 26, 2006 at 03:42:44AM CEST, I got a letter
where Junio C Hamano <junkio@cox.net> said that...
> Petr Baudis <pasky@suse.cz> writes:
> 
> > diff --git a/perl/private-Error.pm b/perl/private-Error.pm
> > index ebd0749..8fff866 100644
> > --- a/perl/private-Error.pm
> > +++ b/perl/private-Error.pm
> > @@ -290,6 +288,14 @@ use vars qw(@EXPORT_OK @ISA %EXPORT_TAGS
> >  
> >  @ISA = qw(Exporter);
> >  
> > +
> > +sub blessed {
> > +	my $item = shift;
> > +	local $@; # don't kill an outer $@
> > +	ref $item and eval { $item->can('can') };
> > +}
> 
> Hmmm.  I wonder how this relates to what Merlyn actually said?
> 
>         From: merlyn@stonehenge.com (Randal L. Schwartz)
>         Subject: Re: [PATCH] Eliminate Scalar::Util usage from private-Error.pm
>         Date: 10 Jul 2006 18:42:35 -0700
>         Message-ID: <863bd8nchg.fsf@blue.stonehenge.com>
>         Cc: Junio C Hamano <junkio@cox.net>, <git@vger.kernel.org>
>         To: Petr Baudis <pasky@suse.cz>
> 
>         >>>>> "Randal" == Randal L Schwartz <merlyn@stonehenge.com> writes:
>         Randal> sub blessed {
>         Randal> my $item = shift;
>         Randal> local $@; # don't kill an outer $@
>         Randal> ref $item and eval { $item->can('can') };
>         Randal> }
> 
>         Randal> Oops, lose the local $@ line.  Just found out this is a
>         Randal> broken thing in current Perls.  The rest is good though.
> 
>         And thirdly, ignore what I *just* said, and concentrate on what
>         I *previously* said, becaused my testing was off.
> 
> My reading is that (1) the part of the patch should read
> something like this:
> 
>         sub blessed {
>                 my $item = shift;
>                 ref $item and eval { $item->can('can') };
>         }

I don't know, from my late-night understanding it should have the local
line... :-)

> and (2) Merlyn thinks there is a bigger problem than using Scalar::Util
> which should be dealt with first.  Was the use of try{}catch{}
> syntax sugar (and it is easy to leak memory) the issue?  How was
> that resolved?

We never got to producing anything that could trigger the memleak, at
least I wasn't able to reproduce it based on the rather vague
description.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam

^ permalink raw reply

* Re: [PATCH] Eliminate Scalar::Util usage from private-Error.pm
From: Johannes Schindelin @ 2006-07-26  2:25 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Junio C Hamano, git
In-Reply-To: <20060726021058.GV13776@pasky.or.cz>

Hi,

On Wed, 26 Jul 2006, Petr Baudis wrote:

>   Hi,
> 
> Dear diary, on Wed, Jul 26, 2006 at 04:01:03AM CEST, I got a letter
> where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
> 
> > - It is not at all easy to run git (Perl scripts) in-place. At least for 
> >   Python, you can set a variable in config.mak and be done with it.
> 
>   Does setting prefix to the same directory as where your Git tree is
> help?

Nope. The culprit is

use lib (split(/:/, $ENV{GITPERLLIB} || "/Library/Perl/darwin"));

The latter, /Library/Perl/darwin comes from making "instlibdir" in perl/, 
which in turn is generated by "perl Makefile.PL". Calling the latter with 
PREFIX set does not change the output of "instlibdir" in any way.

> > - private_Error.pm is not used. I had to rename it for Error.pm to be
> >   picked up.
> 
>   Hmm, yes, I guess it is copied in place only during the installation.
> We might add something like
> 
> 	all:
> 		cp private-Error.pm blib/lib/Error.pm
> 
> to the perl/Makefile. Opinions?

This (from Makefile.PL) is already sufficient:

# We come with our own bundled Error.pm. It's not in the set of default
# Perl modules so install it if it's not available on the system yet.
eval { require Error };
if ($@) {
        $pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
}

> > - It even passes t7001 now. _After_ I spent two hours rewriting it in C.
> 
>   Thanks for the patience - I hope we will finally get all the remaining
> Perl problems sorted out.

What patience? Ah yes, I understand: irony.

Seriously, I still believe that proof-of-concepts in Bash or Perl or even 
Python are fine. But they are not for real work, so one of my long-term 
goals for git is to get rid of them.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] Eliminate Scalar::Util usage from private-Error.pm
From: Johannes Schindelin @ 2006-07-26  2:26 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Junio C Hamano, git
In-Reply-To: <20060726021145.GW13776@pasky.or.cz>

Hi,

On Wed, 26 Jul 2006, Petr Baudis wrote:

> Dear diary, on Wed, Jul 26, 2006 at 04:03:32AM CEST, I got a letter
> where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
> > On Wed, 26 Jul 2006, Johannes Schindelin wrote:
> > 
> > > - private_Error.pm is not used. I had to rename it for Error.pm to be
> > >   picked up.
> > 
> > Never mind. After I finally got the GITPERLLIB thing right, it did pick 
> > Error.pm up.
> 
>   cool. How did you tweak it?

I did not. You did. According to 5c4082fd687bd0784d3a4d96550e8afab332b63a.

Ciao,
Dscho

^ permalink raw reply

* Your money, ox warble
From: Sheena Kimball @ 2006-07-26  9:11 UTC (permalink / raw)
  To: git-commits-head-owner

Genuine Swiss made Role8x repilcas are as close to the real thing 
as a repilca watch can be. Sometimes even the professional jewelers 
are unable to tell the difference from the real Role5x watch.

Why spend thousands of dollars on the real deal when 
a repilca watch looks so much alike that only an expert could tell the difference...
And you only pay a fractoin of the price.

VISIT US, AND GET OUR SPECIL 370% DIS1COUNT OFER!

http://KVOTA2jp7eorpv727uk11h6jjz6jj1.viscidlyln.com/

==========
of the Flock?"
good long tug, and replaced the flask. I can't do it without that. I've been
profoundly serious  work, since every bent line illuminates a  straight one,
     I started undressing slowly. I  took off my watch, and  saw that we had
were strong and calm. "We've come to take you higher, to take you home."
     "Sam Douglas," he said dryly. "He died last year."

on the surface of the ocean. His wings were ragged bars of lead,  but  the
in the Plague Quarter  and only on the  antennas. And most important, it was

^ permalink raw reply

* git-clone failures abound
From: Jeff Garzik @ 2006-07-26  4:38 UTC (permalink / raw)
  To: Git Mailing List, Junio C Hamano, Linus Torvalds; +Cc: David S. Miller

I've been seeing several reports lately, from different users on various 
Linux platforms, with the same basic bug report

* "git:// clone of linus's repo times out after 10 minutes"

* someone says, "use rsync:// for the initial clone"

* "it works, thanks!"

People seems to note that this behavior only started recently.  I wonder 
if linux-2.6.git crossed some sort of size threshold that's too much for 
kernel.org CPU load to bear?  I wonder if git-clone is attempting to 
delta-ify, when it really should just be sending the objects in bulk?

	Jeff

^ permalink raw reply

* Re: git-clone failures abound
From: Junio C Hamano @ 2006-07-26  5:02 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: git, David S. Miller, Linus Torvalds
In-Reply-To: <44C6F1D6.5020208@garzik.org>

Jeff Garzik <jeff@garzik.org> writes:

> I've been seeing several reports lately, from different users on
> various Linux platforms, with the same basic bug report
>
> * "git:// clone of linus's repo times out after 10 minutes"
>
> * someone says, "use rsync:// for the initial clone"
>
> * "it works, thanks!"
>
> People seems to note that this behavior only started recently.  I
> wonder if linux-2.6.git crossed some sort of size threshold that's too
> much for kernel.org CPU load to bear?  I wonder if git-clone is
> attempting to delta-ify, when it really should just be sending the
> objects in bulk?

No, this was all my fault, and sorry about the confusion.

GIT 1.4.1 contains commit 583b7ea3 which implemented a side-band
communication for the upload-pack protocol to give progress bar
output to the client downloaders, and in order to do so it
changed the pipe structure of the process.  It used to just fork
two processes piped together that exec rev-list and
pack-objects, and exec cleared alarm().  I mistakenly rewrote
that part to have an extra process that oversees these two
processes but the overseer does not exec and got killed by
alarm().  This bug affects the server side.

GIT 1.4.1 was installed on public kernel.org machines and the
problem started happening after that.

A fix was relatively simple, and I've issued GIT 1.4.1.1 with it
last night -- the master branch also has the same fix.  So when
the kernel.org public machines are updated to 1.4.1.1 it should
solve the problem.

^ permalink raw reply

* Re: [PATCH] Make git-mv a builtin
From: Junio C Hamano @ 2006-07-26  5:47 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git
In-Reply-To: <Pine.LNX.4.63.0607260348130.29667@wbgn013.biozentrum.uni-wuerzburg.de>

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> This also moves add_file_to_index() to read-cache.c. Oh, and while
> touching builtin-add.c, it also removes a duplicate git_config() call.

I'd have preferred to see this not depend on uncooked
merge-recur infrastructure, since it is very likely that this
would be ready to graduate to "master" before merge-recur.

I've branched from "master" and placed the path-list stuff which
was split out of the merge-recur WIP, and applied this patch
with some trivial adjustment, and will place it on "pu", so I'd
appreciate if you can double check the result.

> diff --git a/builtin.h b/builtin.h
> index 5339d86..6f3a439 100755

Huh -- 100755?

^ permalink raw reply

* Re: [RFC/PATCH] git wrapper: add --git-path=<path> and --bare options
From: Uwe Zeisberger @ 2006-07-26  6:18 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Linus Torvalds, git, junkio
In-Reply-To: <Pine.LNX.4.63.0607251952000.29667@wbgn013.biozentrum.uni-wuerzburg.de>

Hi,

Johannes Schindelin wrote:
> > Since "--git-dir" makes more sense than "--git-path", I'd suggest just 
> > fixing the OPTIONS section ;)
> 
> Will do. Thanks.

When you're at it, you may want to change the Subject, too.

Oh, you already sent out a new patch with the old Subject :-)

Best regards
Uwe
-- 
Uwe Zeisberger

http://www.google.com/search?q=sin%28pi%2F2%29

^ permalink raw reply

* Re: [RFC/PATCH] git wrapper: add --git-path=<path> and --bare options
From: Junio C Hamano @ 2006-07-26  7:12 UTC (permalink / raw)
  To: Uwe Zeisberger; +Cc: Johannes Schindelin, Linus Torvalds, git, junkio
In-Reply-To: <20060726061825.GA3638@informatik.uni-freiburg.de>

Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de> writes:

> Johannes Schindelin wrote:
>> > Since "--git-dir" makes more sense than "--git-path", I'd suggest just 
>> > fixing the OPTIONS section ;)
>> 
>> Will do. Thanks.
>
> When you're at it, you may want to change the Subject, too.
>
> Oh, you already sent out a new patch with the old Subject :-)

I've fixed things up to replace all --git-path with --git-dir, I
think.

^ permalink raw reply

* Re: [PATCH] Make git-mv a builtin
From: Johannes Schindelin @ 2006-07-26 10:19 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vk660udcn.fsf@assigned-by-dhcp.cox.net>

Hi,

On Tue, 25 Jul 2006, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > This also moves add_file_to_index() to read-cache.c. Oh, and while
> > touching builtin-add.c, it also removes a duplicate git_config() call.
> 
> I'd have preferred to see this not depend on uncooked
> merge-recur infrastructure, since it is very likely that this
> would be ready to graduate to "master" before merge-recur.

I use "next" to base all my work (git or otherwise) on, and forgot that 
path-list did not yet make it into "master". Sorry.

> I've branched from "master" and placed the path-list stuff which
> was split out of the merge-recur WIP, and applied this patch
> with some trivial adjustment, and will place it on "pu", so I'd
> appreciate if you can double check the result.

Looks good from what I see. BTW do you have any indent command line you 
prefer? I see that all changes but in the usage string (which was my 
fault: thank you), and in Makefile (putting path-list into libgit.a rather 
than linking it specifically), are white space changes.

> > diff --git a/builtin.h b/builtin.h
> > index 5339d86..6f3a439 100755
> 
> Huh -- 100755?

A mistake introduced on cygwin. Again, sorry.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] Eliminate Scalar::Util usage from private-Error.pm
From: Jakub Narebski @ 2006-07-26 13:35 UTC (permalink / raw)
  To: git
In-Reply-To: <Pine.LNX.4.63.0607260416070.29667@wbgn013.biozentrum.uni-wuerzburg.de>

Johannes Schindelin wrote:

> Seriously, I still believe that proof-of-concepts in Bash or Perl or even 
> Python are fine. But they are not for real work, so one of my long-term 
> goals for git is to get rid of them.

I don't think that we would want to rewrite gitweb in C, for example.
And Perl for porcelanish commands is all right, IMVVHO.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

^ permalink raw reply

* [PATCH] Extend testing git-mv for renaming of subdirectories
From: Josef Weidendorfer @ 2006-07-26 13:44 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git, junkio
In-Reply-To: <Pine.LNX.4.63.0607260348130.29667@wbgn013.biozentrum.uni-wuerzburg.de>

Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
---

On Wednesday 26 July 2006 03:52, Johannes Schindelin wrote:
> 	There is no test for it, and I am quite certain the old script
> 	doesn't do it either: git-mv some_tracked_dir/ there/ will
> 	not work. t7001-mv passes, though.

Hmm... Renaming full subtrees worked since the old git-rename days.
I just checked it, and it works fine.

My bad, that there was no test for this, so what about this?

Josef

 t/t7001-mv.sh |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 811a479..9270a41 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -38,4 +38,28 @@ test_expect_success \
     'git-diff-tree -r -M --name-status  HEAD^ HEAD | \
     grep -E "^R100.+path1/COPYING.+path0/COPYING"'
 
+test_expect_success \
+    'adding another file' \
+    'cp ../../README path0/README &&
+     git-add path0/README &&
+     git-commit -m add2 -a'
+
+test_expect_success \
+    'moving whole subdirectory' \
+    'git-mv path0 path2'
+
+test_expect_success \
+    'commiting the change' \
+    'git-commit -m dir-move -a'
+
+test_expect_success \
+    'checking the commit' \
+    'git-diff-tree -r -M --name-status  HEAD^ HEAD | \
+     grep -E "^R100.+path0/COPYING.+path2/COPYING" &&
+     git-diff-tree -r -M --name-status  HEAD^ HEAD | \
+     grep -E "^R100.+path0/README.+path2/README"'
+
 test_done
+
-- 
1.4.2.rc1.g791e

^ permalink raw reply related

* [PATCH 0/5] Some git-instaweb enhancements
From: Johannes Schindelin @ 2006-07-26 14:32 UTC (permalink / raw)
  To: git, junkio, Eric Wong

Hi,

these are assorted fixes/features for git-instaweb:

1) do not mind git being installed somewhere else than /usr/bin
2) do not mind some Apache having mod_cgi builtin
3) store defaults in config
4) fall back to apache if lighttp cannot be found
5) fall back to echo if firefox cannot be found

IMHO 1 & 2 should go in, since they fix bugs. 3 to 5 are nice-to-haves.

Ciao,
Dscho

^ permalink raw reply

* [PATCH 1/5] git-instaweb: respect bindir from Makefile
From: Johannes Schindelin @ 2006-07-26 14:32 UTC (permalink / raw)
  To: git, junkio, Eric Wong


Not everybody installs git to /usr/bin/git.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index baed711..f3726d4 100644
--- a/Makefile
+++ b/Makefile
@@ -624,7 +624,7 @@ git-instaweb: git-instaweb.sh gitweb/git
 	    -e '/@@GITWEB_CGI@@/d' \
 	    -e '/@@GITWEB_CSS@@/r gitweb/gitweb.css' \
 	    -e '/@@GITWEB_CSS@@/d' \
-	    $@.sh > $@+
+	    $@.sh | sed "s|/usr/bin/git|$(bindir)/git|" > $@+
 	chmod +x $@+
 	mv $@+ $@
 
-- 
1.4.2.rc2.g6a4e

^ permalink raw reply related

* [PATCH 2/5] git-instaweb: some Apache have mod_cgi builtin
From: Johannes Schindelin @ 2006-07-26 14:33 UTC (permalink / raw)
  To: git, junkio, Eric Wong


So test for it, and do not always try to load mod_cgi.o.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 git-instaweb.sh |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/git-instaweb.sh b/git-instaweb.sh
index 63b18b9..9829c59 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -183,8 +183,10 @@ PerlPassEnv GIT_EXEC_DIR
 EOF
 	else
 		# plain-old CGI
+		list_mods=`echo "$httpd" | sed "s/-f$/-l/"`
+		$list_mods | grep 'mod_cgi\.c' >/dev/null || \
+		echo "LoadModule cgi_module $module_path/mod_cgi.so" >> "$conf"
 		cat >> "$conf" <<EOF
-LoadModule cgi_module $module_path/mod_cgi.so
 AddHandler cgi-script .cgi
 <Location /gitweb.cgi>
 	Options +ExecCGI
-- 
1.4.2.rc2.g6a4e

^ permalink raw reply related

* [PATCH 3/5] git-instaweb: store parameters in config
From: Johannes Schindelin @ 2006-07-26 14:33 UTC (permalink / raw)
  To: git, junkio, Eric Wong


It already reads the config for defaults, and now it also stores
the last passed parameters in the config.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 git-instaweb.sh |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/git-instaweb.sh b/git-instaweb.sh
index 9829c59..1d3ea73 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -78,6 +78,7 @@ do
 		;;
 	--local|-l)
 		local=true
+		git repo-config instaweb.local true
 		;;
 	-d|--httpd|--httpd=*)
 		case "$#,$1" in
@@ -89,6 +90,7 @@ do
 			httpd="$2"
 			shift ;;
 		esac
+		git-repo-config instaweb.httpd "$httpd"
 		;;
 	-b|--browser|--browser=*)
 		case "$#,$1" in
@@ -100,6 +102,7 @@ do
 			browser="$2"
 			shift ;;
 		esac
+		git-repo-config instaweb.browser "$browser"
 		;;
 	-p|--port|--port=*)
 		case "$#,$1" in
@@ -111,6 +114,7 @@ do
 			port="$2"
 			shift ;;
 		esac
+		git-repo-config instaweb.port "$port"
 		;;
 	-m|--module-path=*|--module-path)
 		case "$#,$1" in
@@ -122,6 +126,7 @@ do
 			module_path="$2"
 			shift ;;
 		esac
+		git-repo-config instaweb.modulepath "$module_path"
 		;;
 	*)
 		usage
-- 
1.4.2.rc2.g6a4e

^ permalink raw reply related

* [PATCH 4/5] git-instaweb: Fall back to Apache when LigHTTP was not found
From: Johannes Schindelin @ 2006-07-26 14:34 UTC (permalink / raw)
  To: git, junkio, Eric Wong


Apache is more likely to be installed...

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 git-instaweb.sh |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/git-instaweb.sh b/git-instaweb.sh
index 1d3ea73..242b55e 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -25,9 +25,6 @@ conf=$GIT_DIR/gitweb/httpd.conf
 
 # Defaults:
 
-# if installed, it doesn't need further configuration (module_path)
-test -z "$httpd" && httpd='lighttpd -f'
-
 # probably the most popular browser among gitweb users
 test -z "$browser" && browser='firefox'
 
@@ -135,6 +132,15 @@ do
 	shift
 done
 
+# if installed, it doesn't need further configuration (module_path)
+if [ -z "$httpd" ]; then
+	httpd='lighttpd -f'
+	which "$httpd" >/dev/null 2>&1 || httpd='apache2 -f'
+	which "$httpd" >/dev/null 2>&1 || httpd='apache -f'
+	which "$httpd" >/dev/null 2>&1 || httpd='httpd -f'
+	which "$httpd" >/dev/null || exit 1
+fi
+
 mkdir -p "$GIT_DIR/gitweb/tmp"
 GIT_EXEC_PATH="`git --exec-path`"
 GIT_DIR="$fqgitdir"
-- 
1.4.2.rc2.g6a4e

^ permalink raw reply related

* [PATCH 5/5] git-instaweb: If firefox was not found, just print the URL
From: Johannes Schindelin @ 2006-07-26 14:34 UTC (permalink / raw)
  To: git, junkio, Eric Wong


Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 git-instaweb.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/git-instaweb.sh b/git-instaweb.sh
index 242b55e..340ab98 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -245,4 +245,5 @@ esac
 
 start_httpd
 test -z "$browser" && browser=echo
+which "$browser" >/dev/null 2>&1 || browser=echo
 $browser http://127.0.0.1:$port
-- 
1.4.2.rc2.g6a4e

^ permalink raw reply related

* [PATCH] gitweb: fix two warnings
From: Johannes Schindelin @ 2006-07-26 14:58 UTC (permalink / raw)
  To: git, junkio


These warnings cluttered up my log.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 gitweb/gitweb.cgi |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index e226ac2..e5fca63 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -795,7 +795,7 @@ sub git_read_projects {
 	if (-d $projects_list) {
 		# search in directory
 		my $dir = $projects_list;
-		opendir my $dh, $dir or return undef;
+		opendir my ($dh), $dir or return undef;
 		while (my $dir = readdir($dh)) {
 			if (-e "$projectroot/$dir/HEAD") {
 				my $pr = {
@@ -810,7 +810,7 @@ sub git_read_projects {
 		# 'git%2Fgit.git Linus+Torvalds'
 		# 'libs%2Fklibc%2Fklibc.git H.+Peter+Anvin'
 		# 'linux%2Fhotplug%2Fudev.git Greg+Kroah-Hartman'
-		open my $fd , $projects_list or return undef;
+		open my ($fd), $projects_list or return undef;
 		while (my $line = <$fd>) {
 			chomp $line;
 			my ($path, $owner) = split ' ', $line;
-- 
1.4.2.rc2.g6a4e

^ permalink raw reply related

* Moving a directory into another fails
From: Jon Smirl @ 2006-07-26 15:00 UTC (permalink / raw)
  To: git

I cloned a git project. Then in the original I did mkdir for a new
directory and use git mv to move an existing directory into it. I then
used cg diff to generate a patch for the move.

When I use cg patch to apply this patch to the cloned tree it fails.
This seems to be a problem in the git code, not cg.  It is not picking
up the creation of the new intervening subdirectory correctly.

I just synced and this does not work in the current code.

-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply

* Re: [PATCH] Eliminate Scalar::Util usage from private-Error.pm
From: Johannes Schindelin @ 2006-07-26 15:17 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git
In-Reply-To: <ea7r3s$ta2$1@sea.gmane.org>

Hi,

[please do not remove me from the Cc: when replying to my mail]

On Wed, 26 Jul 2006, Jakub Narebski wrote:

> Johannes Schindelin wrote:
> 
> > Seriously, I still believe that proof-of-concepts in Bash or Perl or even 
> > Python are fine. But they are not for real work, so one of my long-term 
> > goals for git is to get rid of them.
> 
> I don't think that we would want to rewrite gitweb in C, for example.
> And Perl for porcelanish commands is all right, IMVVHO.

This is true as long as you do not have problems with Perl. As soon as you 
start having too many problems with Perl, you want to get rid of it as 
soon as possible.

Think missing modules. Think ActiveState. Think corporate environment. 
Think other platforms. Think having to mix compilers. Or to support 
another one, because you cannot mix. Etc. etc.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] Extend testing git-mv for renaming of subdirectories
From: Johannes Schindelin @ 2006-07-26 15:22 UTC (permalink / raw)
  To: Josef Weidendorfer; +Cc: git, junkio
In-Reply-To: <200607261544.08435.Josef.Weidendorfer@gmx.de>

Hi,

On Wed, 26 Jul 2006, Josef Weidendorfer wrote:

> On Wednesday 26 July 2006 03:52, Johannes Schindelin wrote:
> > 	There is no test for it, and I am quite certain the old script
> > 	doesn't do it either: git-mv some_tracked_dir/ there/ will
> > 	not work. t7001-mv passes, though.
> 
> Hmm... Renaming full subtrees worked since the old git-rename days.
> I just checked it, and it works fine.

Thanks.

And thanks again: since there is a test now, I'll have to implement that 
feature, too, I guess ;-)

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox