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

Re: [PATCH v8 0/9] connect: various cleanups

From
Torsten Bögershausen <tboegi@web.de>
Date
May 28, 2016, 05:02 UTC
Message-ID
<5071966e-6bce-fa91-8837-81cb3c9157f7@web.de>
In-Reply-To
<20160527215943.GA21018@glandium.org>
On 27.05.16 23:59, Mike Hommey wrote:
Show 6 quoted lines
> On Fri, May 27, 2016 at 04:24:20PM +0200, Torsten Bögershausen wrote:
>> On 27.05.16 04:27, Mike Hommey wrote:
>>> Changes from v7:
>>> - Fixed comments.
>>>
>>> Mike Hommey (9):
All in all, a great improvement.
2 things left.
- The comment about [] is now stale, isn't it ?
- The legacy support should only be active for ssh, and not
  be used by other schemes.
diff --git a/connect.c b/connect.c
index 076ae09..79b8dae 100644
--- a/connect.c
+++ b/connect.c
@@ -618,10 +618,6 @@ static enum protocol parse_connect_url(const char *url_orig, char **ret_user,
                }
        }
 
-       /*
-        * Don't do destructive transforms as protocol code does
-        * '[]' unwrapping in get_host_and_port()
-        */
        end = host_end(&host, 0);
 
        if (protocol == PROTO_LOCAL)
@@ -673,7 +669,7 @@ static enum protocol parse_connect_url(const char *url_orig, char **ret_user,
         * "host:port" and NULL.
         * To support this undocumented legacy we still need to split the port.
         */
-       if (!port)
+       if (!port && protocol == PROTO_SSH)
                port = get_port(host);
 
        *ret_user = user ? xstrdup(user) : NULL;
Previous: Mike HommeyNext: Mike Hommey
Message 13 of 16 in “connect: various cleanups”
  1. 0/9 connect: various cleanupsMike Hommey, May 27, 2016
  2. 1/9 connect: document why we sometimes call get_port after get_host_and_portMike Hommey, May 27, 2016
  3. 2/9 connect: call get_host_and_port() earlierMike Hommey, May 27, 2016
  4. 3/9 connect: re-derive a host:port string from the separate host and port variablesMike Hommey, May 27, 2016
  5. 4/9 connect: make parse_connect_url() return separated host and portMike Hommey, May 27, 2016
  6. 5/9 connect: group CONNECT_DIAG_URL handling codeMike Hommey, May 27, 2016
  7. 6/9 connect: make parse_connect_url() return the user part of the url as a separate valueMike Hommey, May 27, 2016
  8. 7/9 connect: change the --diag-url output to separate user and hostMike Hommey, May 27, 2016
  9. 8/9 connect: actively reject git:// urls with a user partMike Hommey, May 27, 2016
  10. 9/9 connect: move ssh command line preparation to a separate functionMike Hommey, May 27, 2016
  11. Torsten BögershausenMay 27, 2016
  12. Mike HommeyMay 27, 2016
  13. Torsten BögershausenMay 28, 2016
  14. Mike HommeyMay 28, 2016
  15. Torsten BögershausenMay 28, 2016
  16. Mike HommeyMay 28, 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.