* counting the number of connections?
@ 2009-02-28 6:44 Tay Ray Chuan
2009-03-05 16:18 ` David Kågedal
0 siblings, 1 reply; 3+ messages in thread
From: Tay Ray Chuan @ 2009-02-28 6:44 UTC (permalink / raw)
To: git
Hi,
some time ago I noticed curl doesn't remember your credentials (apart
from those it can get from ~/.netrc), and very recently there was an
thread on repeated prompting for credentials while pushing to https.
I've written a simple patch series, which allows git to play nice
without curl_multi. That is, git uses a single persistent connection
throughout.
However, I'm at a loss at how to test for this. How does one count the
number of connections made during the lifespan of a program's
execution? So far, I've been relying on my firewall log (Comodo on
windows). Perhaps there a more operating system/software-agnostic
method to do this?
--
Cheers,
Ray Chuan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: counting the number of connections?
2009-02-28 6:44 counting the number of connections? Tay Ray Chuan
@ 2009-03-05 16:18 ` David Kågedal
2009-03-05 17:00 ` Johannes Schindelin
0 siblings, 1 reply; 3+ messages in thread
From: David Kågedal @ 2009-03-05 16:18 UTC (permalink / raw)
To: git; +Cc: Tay Ray Chuan
Tay Ray Chuan <rctay89@gmail.com> writes:
> Hi,
>
> some time ago I noticed curl doesn't remember your credentials (apart
> from those it can get from ~/.netrc), and very recently there was an
> thread on repeated prompting for credentials while pushing to https.
>
> I've written a simple patch series, which allows git to play nice
> without curl_multi. That is, git uses a single persistent connection
> throughout.
>
> However, I'm at a loss at how to test for this. How does one count the
> number of connections made during the lifespan of a program's
> execution? So far, I've been relying on my firewall log (Comodo on
> windows). Perhaps there a more operating system/software-agnostic
> method to do this?
You could set up a single-use tcp forwarder which will make any second
connection fail. Using socat, for instance:
$ socat tcp-listen:2222,bind=localhost tcp:my.server:22 &
$ nc localhost 2222
SSH-2.0-OpenSSH_5.1p1 Debian-3ubuntu1
^C
$ nc localhost 2222
localhost [127.0.0.1] 2222 (?) : Connection refused
--
David Kågedal
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: counting the number of connections?
2009-03-05 16:18 ` David Kågedal
@ 2009-03-05 17:00 ` Johannes Schindelin
0 siblings, 0 replies; 3+ messages in thread
From: Johannes Schindelin @ 2009-03-05 17:00 UTC (permalink / raw)
To: David Kågedal; +Cc: git, Tay Ray Chuan
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1415 bytes --]
Hi,
On Thu, 5 Mar 2009, David Kågedal wrote:
> Tay Ray Chuan <rctay89@gmail.com> writes:
>
> > some time ago I noticed curl doesn't remember your credentials (apart
> > from those it can get from ~/.netrc), and very recently there was an
> > thread on repeated prompting for credentials while pushing to https.
> >
> > I've written a simple patch series, which allows git to play nice
> > without curl_multi. That is, git uses a single persistent connection
> > throughout.
> >
> > However, I'm at a loss at how to test for this. How does one count the
> > number of connections made during the lifespan of a program's
> > execution? So far, I've been relying on my firewall log (Comodo on
> > windows). Perhaps there a more operating system/software-agnostic
> > method to do this?
>
> You could set up a single-use tcp forwarder which will make any second
> connection fail. Using socat, for instance:
>
> $ socat tcp-listen:2222,bind=localhost tcp:my.server:22 &
> $ nc localhost 2222
> SSH-2.0-OpenSSH_5.1p1 Debian-3ubuntu1
> ^C
> $ nc localhost 2222
> localhost [127.0.0.1] 2222 (?) : Connection refused
AFAICT Ray wants to provide tests for Git's test suite, and introducing
socat as a dependency for our tests does not really fly all that well.
But IIRC somebody convinced Ray that it is better to require a new-enough
cURL version so that the patch becomes moot itself.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-05 17:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-28 6:44 counting the number of connections? Tay Ray Chuan
2009-03-05 16:18 ` David Kågedal
2009-03-05 17:00 ` Johannes Schindelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).