Re: [PATCH v2 5/6] clone: fix hostname parsing when guessing dir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 30, 2015 at 09:53:07AM -0700, Junio C Hamano wrote:
> Junio C Hamano <gitster@xxxxxxxxx> writes:
> 
> > 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@xxxxxxx 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@xxxxxxx 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@xxxxxxx 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.

One more question for backwards compatibility remains then.
Currently when we clone something like 'http://example.com:2222/'
we'd create a git repository '2222' as we'd split on the first
occurrence of ':'. Should we remain backwards compatible here, as
well, or change the behavior to use 'example.com' as repository
name?

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]