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

Re: git_inetd_server: run git-http-backend using inetd

From
Torsten Bögershausen <tboegi@web.de>
Date
Jul 20, 2014, 06:10 UTC
Message-ID
<53CB5D64.9060801@web.de>
In-Reply-To
<20140719170623.GA29072@google.com>
On 07/19/2014 07:06 PM, Jonathan Nieder wrote:
Show 11 quoted lines
> Torsten Bögershausen wrote:
>
>> Jonathan, (I'm good in searching, but bad in finding)
>> could you point out where the source code for the git package for
>> debian is ?
>>
>> I recently learned about mDNS, and will probably do some tests
>> and experiments later, and would like to test the lookup feature
>> of "0010".
> Thanks.  It's at git://git.debian.org/~jrnieder-guest/git branch
> release+patches and mirrored at http://repo.or.cz/r/git/debian
With my limited reading of the RFC and the code, and without having
test environment, my spontanous (and probably incomplete) change could 
look like this:
- Treat "host:9418" the same as "host"
- When the hosts ends with .local, do not use DNS.
static int git_tcp_connect_sock(char *host, int flags)
{
     struct strbuf error_message = STRBUF_INIT;
     int sockfd = -1, gai = 0;
     const char *port = NULL;
     struct host *hosts = NULL;
     int j, n = 0;
     get_host_and_port(&host, &port);
     if (!port)
         port = STR(DEFAULT_GIT_PORT);
     n = get_srv(host, &hosts);
     if ((n <= 0) && ends_with(host, ".local")) {
         /*
           host.local is really local, do not send it to a DNS resolver
           The user may try host without .local
          */
         die("Unable to look up %s", host);
     }
     if (!n) {
         hosts = xmalloc(sizeof(*hosts));
         hosts[0].hostname = xstrdup(host);
         hosts[0].port = xstrdup(port);
[snip]
Previous: Jonathan NiederNext: Torsten Bögershausen
Message 12 of 13 in “git_inetd_server: run git-http-backend using inetd”
  1. Kyle J. McKayJul 17, 2014
  2. Jonathan NiederJul 17, 2014
  3. Kyle J. McKayJul 17, 2014
  4. Jonathan NiederJul 18, 2014
  5. Kyle J. McKayJul 18, 2014
  6. Jonathan NiederJul 18, 2014
  7. Kyle J. McKayJul 19, 2014
  8. Jonathan NiederJul 19, 2014
  9. Kyle J. McKayJul 19, 2014
  10. Torsten BögershausenJul 19, 2014
  11. Jonathan NiederJul 19, 2014
  12. Torsten BögershausenJul 20, 2014
  13. Torsten BögershausenJul 20, 2014

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.