Re: [PATCH 2/2] decode file:// and ssh:// URLs
- From
- Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
- Date
- May 27, 2010, 10:50 UTC
- Message-ID
- <20100527105014.GA7865@LK-Perkele-V2.elisa-laajakaista.fi>
- In-Reply-To
- <20100523091944.GB16520@coredump.intra.peff.net>
On Sun, May 23, 2010 at 05:19:44AM -0400, Jeff King wrote:
Show 14 quoted lines
> We generally treat these as equivalent to "/path/to/repo" > and "host:path_to_repo" respectively. However, they are URLs > and as such may be percent-encoded. The current code simply > uses them as-is without any decoding. > > With this patch, we will now percent-decode any file:// or > ssh:// url (or ssh+git, git+ssh, etc) at the transport > layer. We continue to treat plain paths and "host:path" > syntax literally. > > Signed-off-by: Jeff King <peff@peff.net> > --- > I think this also impacts git:// URLs. Which I is probably a good thing, > but I haven't looked extensively for unexpected fallouts.
One possible fallout: IPv6 scope syntax uses literal '%' in host part. The relevant RFC indicates it should be escaped, but in the past connect would fail if it was... But then, who uses that syntax...
-Ilari