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

Re: [PATCH 2/3] clone: make --local handle URLs

From
Johannes Sixt <j6t@kdbg.org>
Date
May 28, 2012, 18:31 UTC
Message-ID
<4FC3C46D.5070704@kdbg.org>
In-Reply-To
<20120526034532.GB14332@sigill.intra.peff.net>
Am 26.05.2012 05:45, schrieb Jeff King:
> And did you know that file:// URLs
> can have a hostname in them? How useless.
...
Show 14 quoted lines
> +test_expect_success 'cloning file:// turns off local optimizations' '
> +	git clone --bare file://"$PWD"/a non-local &&
> +	! repo_is_hardlinked non-local
> +'
> +
> +test_expect_success 'cloning file:// with --local uses hardlinks' '
> +	git clone --bare --local file://"$PWD"/a force-local &&
> +	repo_is_hardlinked force-local
> +'
> +
> +test_expect_success 'cloning file:// with --local parses URL properly' '
> +	git clone --bare --local file://host/"$PWD"/%61 force-local-odd &&
> +	repo_is_hardlinked force-local-odd
> +'

I'm pretty certain that we must use file://c:/path/to/repo on Windows to make these work. This means we need $(pwd) rather than $PWD. But what does this mean w.r.t. parsing the URL in the strict sense? Is "c:" the host part?

-- Hannes
Previous: Jeff KingNext: Jeff King
Message 4 of 19 in “clone --local fixes”
  1. 0/3 clone --local fixesJeff King, May 26, 2012
  2. 1/3 t5701: modernize styleJeff King, May 26, 2012
  3. 2/3 clone: make --local handle URLsJeff King, May 26, 2012
  4. Johannes SixtMay 28, 2012
  5. Jeff KingMay 28, 2012
  6. 3/3 clone: allow --no-local to turn off local optimizationsJeff King, May 26, 2012
  7. 4/3 clone: send diagnostic messages to stderrJeff King, May 26, 2012
  8. Junio C HamanoMay 27, 2012
  9. Jeff KingMay 28, 2012
  10. Junio C HamanoMay 29, 2012
  11. Jeff KingMay 30, 2012
  12. Jeff KingMay 30, 2012
  13. 1/2 docs/clone: mention that --local may be ignoredJeff King, May 30, 2012
  14. 2/2 clone: allow --no-local to turn off local optimizationsJeff King, May 30, 2012
  15. Junio C HamanoMay 30, 2012
  16. Jeff KingMay 30, 2012
  17. Junio C HamanoMay 30, 2012
  18. Jeff KingMay 30, 2012
  19. Junio C HamanoMay 30, 2012

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.