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

Re: [PATCHv3] submodule--helper: normalize funny urls

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 20, 2016, 19:53 UTC
Message-ID
<xmqqvawmg5kh.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAGZ79kZyCXKnt9kTbnD8KrnsjJVb_7juW2epmdP9XqcRGfg=GA@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 10 quoted lines
> My thought was to fix it nevertheless, such that the url recorded as
> remote.origin.url is always the first case (no l or /. at the end).
>
> If we were to add this fix to clone, then it may be easier to debug
> submodule url schemes for users as the submodule url would then
> be a concatenation of remote.origin.url and the relative part.
>
> That seems easier to understand than ${remote.origin.url%%/.} +
> relative path, maybe? (Because then the user doesn't need to guess
> or remember historical behavior that is wrong on how this)

Are you declaring that trailing / or /. will now be illegal? If you are declaring that, then I agree that new codepaths no longer have to worry about "strip / or /. before concatenating" and will simplify things for them. But otherwise, such a "fix" also would have an effect of hiding bugs from codepaths. They still need to be prepared to see any of the three variants and cope with them correctly, right?

Previous: Stefan BellerNext: Stefan Beller
Message 11 of 12 in “[PATCHv3] submodule--helper: normalize funny urls”
  1. Stefan BellerOct 18, 2016
  2. Junio C HamanoOct 18, 2016
  3. Junio C HamanoOct 18, 2016
  4. Stefan BellerOct 18, 2016
  5. Junio C HamanoOct 19, 2016
  6. Stefan BellerOct 19, 2016
  7. Junio C HamanoOct 19, 2016
  8. Stefan BellerOct 20, 2016
  9. Junio C HamanoOct 20, 2016
  10. Stefan BellerOct 20, 2016
  11. Junio C HamanoOct 20, 2016
  12. Stefan BellerOct 21, 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.