<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/connect.c, branch v2.4.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-04-20T22:28:33Z</updated>
<entry>
<title>Merge branch 'tb/connect-ipv6-parse-fix'</title>
<updated>2015-04-20T22:28:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-04-20T22:28:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9718c7c0c2a92585729d0f2e05ebf2c44b0cc56a'/>
<id>urn:sha1:9718c7c0c2a92585729d0f2e05ebf2c44b0cc56a</id>
<content type='text'>
An earlier update to the parser that disects an address broke an
address, followed by a colon, followed by an empty string (instead
of the port number).

* tb/connect-ipv6-parse-fix:
  connect.c: ignore extra colon after hostname
</content>
</entry>
<entry>
<title>connect.c: ignore extra colon after hostname</title>
<updated>2015-04-09T04:00:53Z</updated>
<author>
<name>Torsten Bögershausen</name>
<email>tboegi@web.de</email>
</author>
<published>2015-04-07T20:03:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6b6c5f7a2f66751a93afce54277a1f30ab0dc521'/>
<id>urn:sha1:6b6c5f7a2f66751a93afce54277a1f30ab0dc521</id>
<content type='text'>
Ignore an extra ':' at the end of the hostname in URL's like
"ssh://example.com:/path/to/repo"

The colon is meant to separate a port number from the hostname.
If the port is empty, the colon should be ignored, see RFC 3986.

It had been working for URLs with ssh:// scheme, but was unintentionally
broken in 86ceb3, "allow ssh://user@[2001:db8::1]/repo.git"

Reported-by: Reid Woodbury Jr. &lt;reidw@rawsound.com&gt;
Signed-off-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>connect.c: do not leak "conn" after showing diagnosis</title>
<updated>2015-03-10T22:36:03Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2015-03-09T16:58:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=04f20c04c6e51ee061a44406b9a73bf54683d8eb'/>
<id>urn:sha1:04f20c04c6e51ee061a44406b9a73bf54683d8eb</id>
<content type='text'>
When git_connect() is called to see how the URL is parsed for
debugging purposes with CONNECT_DIAG_URL set, the variable conn is
leaked.  At this point in the codeflow, it only has its memory and
no other resource is associated with it, so it is sufficient to
clean it up by just freeing it.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tb/connect-ipv6-parse-fix'</title>
<updated>2015-03-05T20:45:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-05T20:45:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=42da484006186e653e8b3bf3b4c6b40816450ed2'/>
<id>urn:sha1:42da484006186e653e8b3bf3b4c6b40816450ed2</id>
<content type='text'>
We did not parse username followed by literal IPv6 address in SSH
transport URLs, e.g. ssh://user@[2001:db8::1]:22/repo.git
correctly.

* tb/connect-ipv6-parse-fix:
  t5500: show user name and host in diag-url
  t5601: add more test cases for IPV6
  connect.c: allow ssh://user@[2001:db8::1]/repo.git
</content>
</entry>
<entry>
<title>Merge branch 'rs/simple-cleanups'</title>
<updated>2015-03-05T20:45:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-05T20:45:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8a6444d50ea73350ae7e6083ecc63393749e5bb0'/>
<id>urn:sha1:8a6444d50ea73350ae7e6083ecc63393749e5bb0</id>
<content type='text'>
Code cleanups.

* rs/simple-cleanups:
  sha1_name: use strlcpy() to copy strings
  pretty: use starts_with() to check for a prefix
  for-each-ref: use skip_prefix() to avoid duplicate string comparison
  connect: use strcmp() for string comparison
</content>
</entry>
<entry>
<title>Merge branch 'jk/daemon-interpolate'</title>
<updated>2015-03-03T22:37:06Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-03T22:37:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4c3dbbf7225c45ab0e04953090d0ece4a15e83a2'/>
<id>urn:sha1:4c3dbbf7225c45ab0e04953090d0ece4a15e83a2</id>
<content type='text'>
The "interpolated-path" option of "git daemon" inserted any string
client declared on the "host=" capability request without checking.
Sanitize and limit %H and %CH to a saner and a valid DNS name.

* jk/daemon-interpolate:
  daemon: sanitize incoming virtual hostname
  t5570: test git-daemon's --interpolated-path option
  git_connect: let user override virtual-host we send to daemon
</content>
</entry>
<entry>
<title>t5500: show user name and host in diag-url</title>
<updated>2015-02-22T20:04:01Z</updated>
<author>
<name>Torsten Bögershausen</name>
<email>tboegi@web.de</email>
</author>
<published>2015-02-21T15:52:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3f55ccab8e0fec73c8e38b909e9bb4963bfb8f6a'/>
<id>urn:sha1:3f55ccab8e0fec73c8e38b909e9bb4963bfb8f6a</id>
<content type='text'>
The URL for ssh may have include a username before the hostname,
like ssh://user@host/repo.
When literal IPV6 addresses are used together with a username,
the substring "user@[::1]" must be converted into "user@::1".

Make that conversion visible for the user, and write userandhost
in the diagnostics

Signed-off-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>connect.c: allow ssh://user@[2001:db8::1]/repo.git</title>
<updated>2015-02-22T20:02:59Z</updated>
<author>
<name>Torsten Bögershausen</name>
<email>tboegi@web.de</email>
</author>
<published>2015-02-21T15:52:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=86ceb337ec340c7db9b060b90bfab05a08b8251b'/>
<id>urn:sha1:86ceb337ec340c7db9b060b90bfab05a08b8251b</id>
<content type='text'>
The ssh:// syntax was added in 2386d658 (Add first cut at "git
protocol" connect logic., 2005-07-13), it accepted
ssh://user@2001:db8::1/repo.git, which is now legacy.

Over the years the parser was improved to support [] and port numbers,
but the combination of ssh://user@[2001:db8::1]:222/repo.git did
never work.

The only only way to use a user name, a literall IPV6 address and a port
number was ssh://[user@2001:db8::1]:222/repo.git

(Thanks to Christian Taube &lt;lists@hcf.yourweb.de&gt; for reporting this long
standing issue)

New users would use ssh://user@[2001:db8::1]:222/repo.git,
so change the parser to handle it correctly.

Support the old legacy URLs as well, to be backwards compatible,
and avoid regressions for users which upgrade an existing installation
to a later Git version.

Signed-off-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>connect: use strcmp() for string comparison</title>
<updated>2015-02-22T20:01:37Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2015-02-21T19:49:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2ae7f90f263760abd242501471f123632395d7b3'/>
<id>urn:sha1:2ae7f90f263760abd242501471f123632395d7b3</id>
<content type='text'>
Get rid of magic string length constants and simply compare the strings
using strcmp().  This makes the intent of the code a bit clearer.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git_connect: let user override virtual-host we send to daemon</title>
<updated>2015-02-17T21:15:07Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-02-17T08:37:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=94bc83c5930c8c73fb0106b629123e2413b371af'/>
<id>urn:sha1:94bc83c5930c8c73fb0106b629123e2413b371af</id>
<content type='text'>
When we connect to a git-daemon at a given host and port, we
actually send the string "localhost:9418" to the other side,
which allows it to do virtual-hosting lookups. For testing
and debugging, we'd like to be able to send arbitrary
strings, rather than the hostname we actually connected to.

Using "insteadOf" config does not work for this purpose, as
the hostname determination happens at a very low level,
right before we feed the hostname to our lookup routines.
You could use /etc/hosts or similar to get around this, but
we cannot do that portably from our test suite.

Instead, this patch provides an environment variable that
can be used to send an arbitrary string.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
