<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/daemon.c, branch v2.1.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.1.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.1.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-07-16T18:25:47Z</updated>
<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>
<entry>
<title>daemon/config: factor out duplicate xstrdup_tolower</title>
<updated>2014-05-23T19:39:44Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-22T09:44:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=88d5a6f6cd1b63e1637027322cdfdbeefe38c3ed'/>
<id>urn:sha1:88d5a6f6cd1b63e1637027322cdfdbeefe38c3ed</id>
<content type='text'>
We have two implementations of the same function; let's drop
that to one. We take the name from daemon.c, but the
implementation (which is just slightly more efficient) from
the config code.

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: move daemonize() to libgit.a</title>
<updated>2014-02-10T18:46:35Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-02-08T07:08:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=de0957ce2e88b8ad639f1e4a7197eb556e114a1c'/>
<id>urn:sha1:de0957ce2e88b8ad639f1e4a7197eb556e114a1c</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/daemon-informative-errors-typofix'</title>
<updated>2014-01-10T18:32:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-01-10T18:32:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0c52457b7c6311d004d0fb1f5b7bb7d5cc6dbf4e'/>
<id>urn:sha1:0c52457b7c6311d004d0fb1f5b7bb7d5cc6dbf4e</id>
<content type='text'>
* nd/daemon-informative-errors-typofix:
  daemon: be strict at parsing parameters --[no-]informative-errors
</content>
</entry>
<entry>
<title>daemon: be strict at parsing parameters --[no-]informative-errors</title>
<updated>2013-12-20T22:05:07Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-12-20T10:53:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=82246b765bdfc191aa809cf3dd672de18ad6352a'/>
<id>urn:sha1:82246b765bdfc191aa809cf3dd672de18ad6352a</id>
<content type='text'>
Use strcmp() instead of starts_with()/!prefixcmp() to stop accepting
--informative-errors-just-a-little

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
