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

[PATCH 0/3] clone --local fixes

From
Jeff King <peff@peff.net>
Date
May 26, 2012, 03:42 UTC
Message-ID
<20120526034226.GA14287@sigill.intra.peff.net>
Emeric mentioned that he was confused by the behavior of
  git clone --local file:///path/to/repo

in that the --local is silently ignored. Looking over the documentation, it is quite unclear whether it is supposed to do anything or not. I don't think it's an especially pressing use case, so one solution could be to simply clarify the current behavior in the documentation.

However, I figured this should just be a two-line fix to give it more sensible behavior, so why not just make it to do the sensible thing? And while my initial version was two lines, it ended up growing to handle all of the corner cases properly. So I'm not super-excited about patch 2, but given that it is written, I think it's a reasonable thing to do (and it is not _too_ complex).

And then while I was on the subject, I did patch 3, which is something that has bugged me for a long time.

  [1/3]: t5701: modernize style
  [2/3]: clone: make --local handle URLs
  [3/3]: clone: allow --no-local to turn off local optimizations
-Peff
Next: Jeff King
Message 1 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.