Subject: Re: undoing changes with git-checkout -f

From: Joel Becker <[email-masked]>
Date: Mon, 9 Jan 2006 22:32:47 -0800

On Mon, Jan 09, 2006 at 09:57:40PM -0800, Junio C Hamano wrote:
> Joel Becker <[email-masked]> writes:
> > 	Can we teach the git:// fetch program to use CONNECT over HTTP
> > proxies?  rsync can do this, but git:// cannot, so firewalls that block
> > 9418 mean we use rsync://
> > 	I'm mostly offline this week or I'd take a stab at it.
> 
> It's been there for quite some time, although I never liked the
> way it interfaces with the outside world.
> 

	Ugly snipped...

> It is a bit inconvenient that "git clone" wrapper cannot be used
> on an existing repository, and without an existing repository
> you cannot have .git/config. You could have the config file in
> your site-wide template area, but admittably it is a bit
> awkward.

	Here's what I did.  I modified the usual
ssh-tunnel-over-SSL-CONNECT script to honor http_proxy.  I've attached
it.  With this, I do as so:

	# cp git-tunnel.pl /usr/local/bin
	# export http_proxy="http://my-proxy.my.com:80/"
	# GIT_PROXY_COMMAND="/usr/local/bin/git-tunnel.pl" git clone git://git.kernel.org/pub/scm/... localsource
	# cd localsource
	# vi .git/config
		[core]
			gitproxy = /usr/local/bin/git-tunnel.pl

	This is working for me.  I'd really rather have the tunneling
code be part of connect.c, and have core.proxymethod=external use the
current core.gitproxy method and core.proxymethod=http use $http_proxy.
	But this will suffice for now :-)

Joel

-- 

Life's Little Instruction Book #198

	"Feed a stranger's expired parking meter."

Joel Becker
Principal Software Developer
Oracle
E-mail: [email-masked]
Phone: (650) 506-8127