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

[PATCH 0/2] handling alternates paths with colons

From
Jeff King <peff@peff.net>
Date
Dec 12, 2016, 19:49 UTC
Message-ID
<20161212194929.bdcihf7orjabzb2h@sigill.intra.peff.net>
In-Reply-To
<20161210085133.2pnkz6eqlxoxdckg@sigill.intra.peff.net>
On Sat, Dec 10, 2016 at 03:51:33AM -0500, Jeff King wrote:
Show 15 quoted lines
> So here's the array of options, as I see it:
> 
>   1. Disable quarantine by default; only turn it on if you don't have
>      any of the funny corner cases.
> 
>   2. Introduce an extra single-item environment variable that gets
>      appended to the list of alternates, and side-steps quoting issues.
> 
>   3. Introduce a new variable that can hold an alternate list, and
>      either teach it reasonable quoting semantics, or give it a
>      less-common separator.
> 
>   4. Introduce quoting to the existing variable, but make the quoting
>      character sufficiently obscure that nobody cares about the lack of
>      backwards compatibility.

So I started on (4), but writing the user-facing documentation made me throw up in my mouth a little. Fortunately that inspired me to come up with a fifth option: introduce a quoting mechanism that needs a more obscure signature to kick in, but once kicked-in, uses a less obscure syntax.

So here are patches that do that. It kicks in only when the first character of a path is a double-quote, and then expects the usual C-style quoting. My reasoning is that we wouldn't want to sacrifice '"' for ':', but it's probably OK if we only care about '"' at the very beginning of a path. And it's consistent with many other parts of git which allow optional quoting.

Thoughts?
  [1/2]: alternates: accept double-quoted paths
  [2/2]: tmp-objdir: quote paths we add to alternates
 Documentation/git.txt      |  6 ++++++
 sha1_file.c                | 47 +++++++++++++++++++++++++++++++++++-----------
 t/t5547-push-quarantine.sh | 19 +++++++++++++++++++
 t/t5615-alternate-env.sh   | 18 ++++++++++++++++++
 tmp-objdir.c               | 18 +++++++++++++++++-
 5 files changed, 96 insertions(+), 12 deletions(-)
-Peff
Previous: Jeff KingNext: Jeff King
Message 5 of 46 in “[BUG] Colon in remote urls”
  1. Klaus EthgenDec 9, 2016
  2. Jeff KingDec 9, 2016
  3. Junio C HamanoDec 9, 2016
  4. Jeff KingDec 10, 2016
  5. 0/2 handling alternates paths with colonsJeff King, Dec 12, 2016
  6. 1/2 alternates: accept double-quoted pathsJeff King, Dec 12, 2016
  7. Duy NguyenDec 13, 2016
  8. Jeff KingDec 13, 2016
  9. Junio C HamanoDec 13, 2016
  10. Duy NguyenDec 17, 2016
  11. 2/2 tmp-objdir: quote paths we add to alternatesJeff King, Dec 12, 2016
  12. Johannes SixtDec 12, 2016
  13. Jeff KingDec 13, 2016
  14. Junio C HamanoDec 13, 2016
  15. Jeff KingDec 13, 2016
  16. Junio C HamanoDec 13, 2016
  17. 3/2 t5547-push-quarantine: run the path separator test on Windows, tooJohannes Sixt, Dec 13, 2016
  18. Jeff KingDec 13, 2016
  19. Junio C HamanoDec 13, 2016
  20. 4/2 t5615-alternate-env: double-quotes in file names do not work on WindowsJohannes Sixt, Dec 21, 2016
  21. Jeff KingDec 21, 2016
  22. Johannes SixtDec 22, 2016
  23. Johannes SixtDec 22, 2016
  24. Johannes SchindelinDec 22, 2016
  25. Jeff KingDec 22, 2016
  26. Junio C HamanoDec 12, 2016
  27. Jeff KingDec 13, 2016
  28. Junio C HamanoDec 13, 2016
  29. Jeff KingDec 13, 2016
  30. Junio C HamanoDec 13, 2016
  31. Jeff KingDec 13, 2016
  32. Klaus EthgenDec 10, 2016
  33. Jeff KingDec 10, 2016
  34. Klaus EthgenDec 10, 2016
  35. Johannes SixtDec 9, 2016
  36. Jeff KingDec 10, 2016
  37. Klaus EthgenDec 10, 2016
  38. Jeff KingDec 10, 2016
  39. Klaus EthgenDec 10, 2016
  40. Klaus EthgenDec 10, 2016
  41. Johannes SchindelinDec 10, 2016
  42. Klaus EthgenDec 11, 2016
  43. Philip OakleyDec 11, 2016
  44. Johannes SchindelinDec 12, 2016
  45. Klaus EthgenDec 12, 2016
  46. Johannes SchindelinDec 12, 2016

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.