git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git clone git clone some://url
@ 2019-11-19 14:15 Christoph Berg
  2019-11-20  3:50 ` Junio C Hamano
  2019-12-04 21:40 ` Jonathan Nieder
  0 siblings, 2 replies; 8+ messages in thread
From: Christoph Berg @ 2019-11-19 14:15 UTC (permalink / raw)
  To: git

On some git hosting sites [*], if you copy the repository URL, you'll
actually get "git clone some://url" in the cut buffer. When you then
proceed to do "git clone <paste>" in the next terminal window, the
command executed is actually this:

$ git clone git clone some://url
fatal: Too many arguments.

As silly as the idea might sound, could the clone command possibly
ignore these very specific extra arguments, and just proceed? This has
happened countless times to me, and when I mentioned the idea on
#debian-devel, there were others who had the same problem.

Thanks,
Christoph

[*] hello sourceforge! example:
    https://sourceforge.net/p/wsjt/wsjtx/ci/master/tree/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: git clone git clone some://url
  2019-11-19 14:15 git clone git clone some://url Christoph Berg
@ 2019-11-20  3:50 ` Junio C Hamano
  2019-11-20  6:41   ` Christoph Berg
  2019-11-20 18:07   ` Denton Liu
  2019-12-04 21:40 ` Jonathan Nieder
  1 sibling, 2 replies; 8+ messages in thread
From: Junio C Hamano @ 2019-11-20  3:50 UTC (permalink / raw)
  To: Christoph Berg; +Cc: git

Christoph Berg <myon@debian.org> writes:

> On some git hosting sites [*], if you copy the repository URL, you'll
> actually get "git clone some://url" in the cut buffer. When you then
> proceed to do "git clone <paste>" in the next terminal window, the
> command executed is actually this:
>
> $ git clone git clone some://url
> fatal: Too many arguments.

Or

    $ git git clone some://usr
    $ git git git diff

;-)

I seriously doubt "git" should do anything funky when fed such
command lines.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: git clone git clone some://url
  2019-11-20  3:50 ` Junio C Hamano
@ 2019-11-20  6:41   ` Christoph Berg
  2019-11-21 13:49     ` Danh Doan
  2019-11-20 18:07   ` Denton Liu
  1 sibling, 1 reply; 8+ messages in thread
From: Christoph Berg @ 2019-11-20  6:41 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Re: Junio C Hamano 2019-11-20 <xmqqimnfcikf.fsf@gitster-ct.c.googlers.com>
> Christoph Berg <myon@debian.org> writes:
> 
> > On some git hosting sites [*], if you copy the repository URL, you'll
> > actually get "git clone some://url" in the cut buffer. When you then
> > proceed to do "git clone <paste>" in the next terminal window, the
> > command executed is actually this:
> >
> > $ git clone git clone some://url
> > fatal: Too many arguments.
> 
> Or
> 
>     $ git git clone some://usr
>     $ git git git diff
> 
> ;-)
> 
> I seriously doubt "git" should do anything funky when fed such
> command lines.

"git git git" is obviously silly. The problem is really just about
this single issue:

1. go to some website, copy the git url
2. type "git clone" in the terminal
3. paste the url, hit enter
4. be annoyed when you ended up with "git clone git clone url://"

Christoph

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: git clone git clone some://url
  2019-11-20  3:50 ` Junio C Hamano
  2019-11-20  6:41   ` Christoph Berg
@ 2019-11-20 18:07   ` Denton Liu
  2019-11-22  5:44     ` Junio C Hamano
  1 sibling, 1 reply; 8+ messages in thread
From: Denton Liu @ 2019-11-20 18:07 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Christoph Berg, git

On Wed, Nov 20, 2019 at 12:50:24PM +0900, Junio C Hamano wrote:
> Christoph Berg <myon@debian.org> writes:
> 
> > On some git hosting sites [*], if you copy the repository URL, you'll
> > actually get "git clone some://url" in the cut buffer. When you then
> > proceed to do "git clone <paste>" in the next terminal window, the
> > command executed is actually this:
> >
> > $ git clone git clone some://url
> > fatal: Too many arguments.
> 
> Or
> 
>     $ git git clone some://usr
>     $ git git git diff

That's why I have `git config alias.git !git` set. It's saved me seconds
of my life from having to retype these lines. ;)

Unfortunately, I don't think we can take a similar approach for the
`git clone git clone ...` case.

> ;-)
> 
> I seriously doubt "git" should do anything funky when fed such
> command lines.
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: git clone git clone some://url
  2019-11-20  6:41   ` Christoph Berg
@ 2019-11-21 13:49     ` Danh Doan
  0 siblings, 0 replies; 8+ messages in thread
From: Danh Doan @ 2019-11-21 13:49 UTC (permalink / raw)
  To: Christoph Berg; +Cc: Junio C Hamano, git

On 2019-11-20 07:41:58+0100, Christoph Berg <myon@debian.org> wrote:
> Re: Junio C Hamano 2019-11-20 <xmqqimnfcikf.fsf@gitster-ct.c.googlers.com>
> > Christoph Berg <myon@debian.org> writes:
> > 
> > > On some git hosting sites [*], if you copy the repository URL, you'll
> > > actually get "git clone some://url" in the cut buffer. When you then
> > > proceed to do "git clone <paste>" in the next terminal window, the
> > > command executed is actually this:
> > >
> > > $ git clone git clone some://url
> > > fatal: Too many arguments.
> > 
> > Or
> > 
> >     $ git git clone some://usr
> >     $ git git git diff
> > 
> > ;-)
> > 
> > I seriously doubt "git" should do anything funky when fed such
> > command lines.
> 
> "git git git" is obviously silly. The problem is really just about
> this single issue:
> 
> 1. go to some website, copy the git url
> 2. type "git clone" in the terminal
> 3. paste the url, hit enter
> 4. be annoyed when you ended up with "git clone git clone url://"

Seriously, people should stop pasting random command from internet
without reading.

Someone had written about paste-hijacking in the past.

c.f. https://news.ycombinator.com/item?id=10554679

-- 
Danh

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: git clone git clone some://url
  2019-11-20 18:07   ` Denton Liu
@ 2019-11-22  5:44     ` Junio C Hamano
  0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2019-11-22  5:44 UTC (permalink / raw)
  To: Denton Liu; +Cc: Christoph Berg, git

Denton Liu <liu.denton@gmail.com> writes:

>> Or
>> 
>>     $ git git clone some://usr
>>     $ git git git diff
>
> That's why I have `git config alias.git !git` set. It's saved me seconds
> of my life from having to retype these lines. ;)

;-)

Yes, it was the above hack of yours I had in mind when I sent my
reply.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: git clone git clone some://url
  2019-11-19 14:15 git clone git clone some://url Christoph Berg
  2019-11-20  3:50 ` Junio C Hamano
@ 2019-12-04 21:40 ` Jonathan Nieder
  2019-12-05 12:35   ` Christoph Berg
  1 sibling, 1 reply; 8+ messages in thread
From: Jonathan Nieder @ 2019-12-04 21:40 UTC (permalink / raw)
  To: Christoph Berg; +Cc: git

Hi,

Christoph Berg wrote:

> On some git hosting sites [*], if you copy the repository URL, you'll
> actually get "git clone some://url" in the cut buffer. When you then
> proceed to do "git clone <paste>" in the next terminal window, the
> command executed is actually this:
>
> $ git clone git clone some://url
> fatal: Too many arguments.

I feel your pain.  Is there an issue tracker post or support ticket
open for some of these hosting sites to make it do the intuitive thing
(just copy the URL) instead?

Thanks,
Jonathan

> [*] hello sourceforge! example:
>     https://sourceforge.net/p/wsjt/wsjtx/ci/master/tree/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: git clone git clone some://url
  2019-12-04 21:40 ` Jonathan Nieder
@ 2019-12-05 12:35   ` Christoph Berg
  0 siblings, 0 replies; 8+ messages in thread
From: Christoph Berg @ 2019-12-05 12:35 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: git

Re: Jonathan Nieder 2019-12-04 <20191204214017.GA195537@google.com>
> > $ git clone git clone some://url
> > fatal: Too many arguments.
> 
> I feel your pain.  Is there an issue tracker post or support ticket
> open for some of these hosting sites to make it do the intuitive thing
> (just copy the URL) instead?

I created one for sf.net now: https://sourceforge.net/p/forge/feature-requests/721/

Christoph

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-12-05 12:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19 14:15 git clone git clone some://url Christoph Berg
2019-11-20  3:50 ` Junio C Hamano
2019-11-20  6:41   ` Christoph Berg
2019-11-21 13:49     ` Danh Doan
2019-11-20 18:07   ` Denton Liu
2019-11-22  5:44     ` Junio C Hamano
2019-12-04 21:40 ` Jonathan Nieder
2019-12-05 12:35   ` Christoph Berg

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).