Re: [PATCH v2 5/6] clone: fix hostname parsing when guessing dir
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 30, 2015, 16:30 UTC
- Message-ID
- <xmqqk2th7gmq.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20150730121811.GA24635@pks-pc.localdomain>
Patrick Steinhardt <ps@pks.im> writes:
Show 17 quoted lines
>> Regardless of the issue you are trying to address, we may want to >> limit that "be prepared for and careful with ':'" logic in the >> existing code to the case where the "last component" does not have >> any other component before it. That is: >> >> http://example.com/foo:bar.git/ >> >> would be stripped to >> >> http://example.com/foo:bar >> >> and then we scan backwards for ':' or '/' and declare that "bar" is >> the name of the repository, but we would probably want "foo:bar" >> instead (or we may not, as some filesystems do not want to have a >> colon in its path components). > > This case is exactly why I did include patches 3 and 4.
Well, but there is the above "or we may not" ;-)
> But actually you are right, currently I still have the old logic > in place that splits on colons in the path component.
Yes. The reason why I suggested the simple route was exactly because I noticed that you didn't seem to care about the above "$site/foo:bar.git/" => "$site/foo:bar" => "bar" transform.
And I think people might depend on that behaviour. "Fixing" that may even be seen as a regression.
When was the last time you created a foo@bar.git repository? Is it really worth the code churn to do patches 3/4?