git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH V4] git clone: is an URL local or ssh

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Nov 5, 2013, 07:14 UTC
Message-ID
<52789AE5.2010702@viscovery.net>
In-Reply-To
<201311042220.50178.tboegi@web.de>
Am 11/4/2013 22:20, schrieb Torsten Bögershausen:
> Bug fix for msygit in t5601 : use $PWD insted of $(pwd)

Not really. $PWD is /c/foo/bar style, but $(pwd) is c:/foo/bar, which is equally good.

Show 5 quoted lines
>  test_expect_success 'clone with excess parameters (2)' '
>  
>  	rm -fr dst &&
> -	test_must_fail git clone -n "file://$(pwd)/src" dst junk
> +	test_must_fail git clone -n "file://$PWD/src" dst junk

That the code change necessitates this change in the test suite is a sign that there is something wrong with the new code.

And indeed, the original works:

C:\Temp\gittest>git clone -n file://c:/Temp/gittest/foo good Cloning into 'good'... remote: Counting objects: 2, done. remote: Total 2 (delta 0), reused 0 (delta 0) Receiving objects: 100% (2/2), done. Checking connectivity... done.

but the changed code does not:

C:\Temp\gittest>D:\src\mingw-git\git clone -n file://c:/Temp/gittest/foo bad Cloning into 'bad'... fatal: 'D:/Src/MsysGit/Temp/gittest/foo' does not appear to be a git repository fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

Can you please make this into a series of small patches so that we can more easily see the good and the bad parts? One of the patches could be a clean-up of the current protocol determination and URL dissection, which is indigestible spaghetti right now.

-- Hannes
Previous: Torsten BögershausenNext: Johannes Sixt
Message 2 of 7 in “git clone: is an URL local or ssh”
  1. git clone: is an URL local or sshTorsten Bögershausen, Nov 4, 2013
  2. Johannes SixtNov 5, 2013
  3. 1/2 git_connect: remove artificial limit of a remote commandJohannes Sixt, Nov 5, 2013
  4. 2/2 git_connect: factor out discovery of the protocol and its partsJohannes Sixt, Nov 5, 2013
  5. Torsten BögershausenNov 5, 2013
  6. Johannes SixtNov 5, 2013
  7. Torsten BögershausenNov 6, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.