Re: [PATCH v2 5/6] clone: fix hostname parsing when guessing dir
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 30, 2015, 16:53 UTC
- Message-ID
- <xmqqfv457fkc.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <xmqqk2th7gmq.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> 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?
Actually, this was an unrelated question and a wrong one to ask at that.
Even though I personally haven't created foo:bar.git repository, because it is no longer 2005, it is highly likely that somewhere there is such a person who depends on the current behaviour of turning that to "bar" on the cloned side. Similarly, even if we the people who read the Git mailing list collectively do not know anybody who has foo@bar.git repository, it is highly likely that somewhere there is such a person who depends on the current behaviour of turning that to "foo@bar" on the cloned side.
So the ideal would be to keep turning $site/foo:bar.git to bar, $site/foo@bar.git to foo@bar, and $scheme//u@p:$host/ to $host.
And it would be ideal if we do so without much code churn. "The whole site is dedicated to host a single repository at the root" is a highly unlikely set-up and it feels wasteful to spend too much effort on.