<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/daemon.c, branch v2.1.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.1.4</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.1.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-10-29T17:35:09Z</updated>
<entry>
<title>Merge branch 'rs/daemon-fixes' into maint</title>
<updated>2014-10-29T17:35:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-29T17:35:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a8f01f87d03bef31d3b7f43c4c46398ec76a8e91'/>
<id>urn:sha1:a8f01f87d03bef31d3b7f43c4c46398ec76a8e91</id>
<content type='text'>
* rs/daemon-fixes:
  daemon: remove write-only variable maxfd
  daemon: fix error message after bind()
  daemon: handle gethostbyname() error
</content>
</entry>
<entry>
<title>daemon: remove write-only variable maxfd</title>
<updated>2014-10-01T20:34:56Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-10-01T10:21:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=107efbeb2409ac3fb01560a42067c8cc506aa249'/>
<id>urn:sha1:107efbeb2409ac3fb01560a42067c8cc506aa249</id>
<content type='text'>
It became unused when 6573faff (NO_IPV6 support for git daemon) replaced
select() with poll().

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>daemon: fix error message after bind()</title>
<updated>2014-10-01T20:34:54Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-10-01T10:18:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9d1b9aa9e10da398f430bc619b361d83bee6df7d'/>
<id>urn:sha1:9d1b9aa9e10da398f430bc619b361d83bee6df7d</id>
<content type='text'>
Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>daemon: handle gethostbyname() error</title>
<updated>2014-10-01T20:34:53Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-10-01T10:16:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eb6c403500dd0b0d78b7b00d7ed0bf6b5daccc4e'/>
<id>urn:sha1:eb6c403500dd0b0d78b7b00d7ed0bf6b5daccc4e</id>
<content type='text'>
If the user-supplied hostname can't be found then we should not use it.
We already avoid doing that in the non-NO_IPV6 case by checking if the
return value of getaddrinfo() is zero (success).  Do the same in the
NO_IPV6 case and make sure the return value of gethostbyname() isn't
NULL before dereferencing this pointer.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cc/replace-edit'</title>
<updated>2014-07-16T18:25:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-16T18:25:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dcc1b3851779ba1e3f55c1116852d87999d2c936'/>
<id>urn:sha1:dcc1b3851779ba1e3f55c1116852d87999d2c936</id>
<content type='text'>
Teach "git replace" an "--edit" mode.

* cc/replace-edit:
  replace: use argv_array in export_object
  avoid double close of descriptors handed to run_command
  replace: replace spaces with tabs in indentation
</content>
</entry>
<entry>
<title>avoid double close of descriptors handed to run_command</title>
<updated>2014-06-25T22:27:24Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-24T09:45:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=28bf9429ef2e1534be8d3a59ad236834be542b86'/>
<id>urn:sha1:28bf9429ef2e1534be8d3a59ad236834be542b86</id>
<content type='text'>
When a file descriptor is given to run_command via the
"in", "out", or "err" parameters, run_command takes
ownership. The descriptor will be closed in the parent
process whether the process is spawned successfully or not,
and closing it again is wrong.

In practice this has not caused problems, because we usually
close() right after start_command returns, meaning no other
code has opened a descriptor in the meantime. So we just get
EBADF and ignore it (rather than accidentally closing
somebody else's descriptor!).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>daemon: use skip_prefix to avoid magic numbers</title>
<updated>2014-06-20T17:45:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-18T19:49:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d12c24d2a96f8f9aeb100b800d8fb217f28a6a2a'/>
<id>urn:sha1:d12c24d2a96f8f9aeb100b800d8fb217f28a6a2a</id>
<content type='text'>
Like earlier cases, we can use skip_prefix to avoid magic
numbers that must match the length of starts_with prefixes.
However, the numbers are a little more complicated here, as
we keep parsing past the prefix. We can solve it by keeping
a running pointer as we parse; its final value is the
location we want.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use skip_prefix to avoid magic numbers</title>
<updated>2014-06-20T17:44:45Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-18T19:47:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ae021d87911da4328157273df24779892cb51277'/>
<id>urn:sha1:ae021d87911da4328157273df24779892cb51277</id>
<content type='text'>
It's a common idiom to match a prefix and then skip past it
with a magic number, like:

  if (starts_with(foo, "bar"))
	  foo += 3;

This is easy to get wrong, since you have to count the
prefix string yourself, and there's no compiler check if the
string changes.  We can use skip_prefix to avoid the magic
numbers here.

Note that some of these conversions could be much shorter.
For example:

  if (starts_with(arg, "--foo=")) {
	  bar = arg + 6;
	  continue;
  }

could become:

  if (skip_prefix(arg, "--foo=", &amp;bar))
	  continue;

However, I have left it as:

  if (skip_prefix(arg, "--foo=", &amp;v)) {
	  bar = v;
	  continue;
  }

to visually match nearby cases which need to actually
process the string. Like:

  if (skip_prefix(arg, "--foo=", &amp;v)) {
	  bar = atoi(v);
	  continue;
  }

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>daemon: mark some strings as const</title>
<updated>2014-06-18T21:56:24Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-18T19:41:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1055a890f04784d7ea7cdaca8d30479e685d8643'/>
<id>urn:sha1:1055a890f04784d7ea7cdaca8d30479e685d8643</id>
<content type='text'>
None of these strings is modified; marking them as const
will help later refactoring.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/daemon-tolower'</title>
<updated>2014-06-16T17:07:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-16T17:07:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b4516df9b88989a175f88aa514a187831631f9f8'/>
<id>urn:sha1:b4516df9b88989a175f88aa514a187831631f9f8</id>
<content type='text'>
* jk/daemon-tolower:
  daemon/config: factor out duplicate xstrdup_tolower
</content>
</entry>
</feed>
