Re: [PATCH 1/2] git-clone: Keep remote names when cloning unless explicitly told not to.
- From
Junio C Hamano <junkio@cox.net>
- Date
- Nov 10, 2005, 17:15 UTC
- Message-ID
- <7vd5l81l15.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20051110115808.418125BF88@nox.op5.se>
exon@op5.se (Andreas Ericsson) writes:
Show 8 quoted lines
> + The name of a new directory to clone into. The "humanish"
> + part of the source repository is used if no directory is
> + explicitly given ("repo" for "/path/to/repo.git" and "foo"
> + for "host.xz:foo/.git"). Cloning into an existing directory
> + is not allowed.
>
> +# Try using "humanish" part of source repo if user didn't specify one
> +[ -z "$dir" ] && dir=$(echo "$repo" | sed -e 's#/*\.git$##' -e 's#.*[/:]##')Micronit; if I version control contents of my home directory on host.xz [*1*] under git, I would say host.xz:.git/ when cloning it, wouldn't I?
Maybe we would want to check if the resulting $dir makes sense after this step.
[Footnote]
*1* ... I wouldn't personally, but some people are known to do that.