<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/http-walker.c, branch v2.10.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.10.1</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.10.1'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2016-07-12T22:17:42Z</updated>
<entry>
<title>http-walker: reduce O(n) ops with doubly-linked list</title>
<updated>2016-07-12T22:17:42Z</updated>
<author>
<name>Eric Wong</name>
<email>e@80x24.org</email>
</author>
<published>2016-07-11T20:51:31Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=94e99012fc7a02c5504214294279fa49b4cc8ce3'/>
<id>urn:sha1:94e99012fc7a02c5504214294279fa49b4cc8ce3</id>
<content type='text'>
Using the a Linux-kernel-derived doubly-linked list
implementation from the Userspace RCU library allows us to
enqueue and delete items from the object request queue in
constant time.

This change reduces enqueue times in the prefetch() function
where object request queue could grow to several thousand
objects.

I left out the list_for_each_entry* family macros from list.h
which relied on the __typeof__ operator as we support platforms
without it.  Thus, list_entry (aka "container_of") needs to be
called explicitly inside macro-wrapped for loops.

The downside is this costs us an additional pointer per object
request, but this is offset by reduced overhead on queue
operations leading to improved performance and shorter queue
depths.

Signed-off-by: Eric Wong &lt;e@80x24.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: avoid disconnecting on 404s for loose objects</title>
<updated>2016-07-12T22:17:42Z</updated>
<author>
<name>Eric Wong</name>
<email>e@80x24.org</email>
</author>
<published>2016-07-11T20:51:30Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=17966c0a63d25b1cc2dd1e98d30873e643bd581f'/>
<id>urn:sha1:17966c0a63d25b1cc2dd1e98d30873e643bd581f</id>
<content type='text'>
404s are common when fetching loose objects on static HTTP
servers, and reestablishing a connection for every single
404 adds additional latency.

Signed-off-by: Eric Wong &lt;e@80x24.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http-walker: remove unused parameter from fetch_object</title>
<updated>2016-07-12T22:17:41Z</updated>
<author>
<name>Eric Wong</name>
<email>e@80x24.org</email>
</author>
<published>2016-07-11T20:51:29Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=43b8bba6b60aa644456d7682b99357dd4778e8d6'/>
<id>urn:sha1:43b8bba6b60aa644456d7682b99357dd4778e8d6</id>
<content type='text'>
This parameter has not been used since commit 1d389ab65dc6
("Add support for parallel HTTP transfers") back in 2005

Signed-off-by: Eric Wong &lt;e@80x24.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http-walker: store url in a strbuf</title>
<updated>2015-09-25T17:18:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-09-24T21:07:31Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=54ba4c5fa2d7de216ca090ac2e657728462c81d5'/>
<id>urn:sha1:54ba4c5fa2d7de216ca090ac2e657728462c81d5</id>
<content type='text'>
We do an unchecked sprintf directly into our url buffer.
This doesn't overflow because we know that it was sized for
"$base/objects/info/http-alternates", and we are writing
"$base/objects/info/alternates", which must be smaller. But
that is not immediately obvious to a reader who is looking
for buffer overflows. Let's switch to a strbuf, so that we
do not have to think about this issue at all.

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>http-walker: simplify process_alternates_response() using strbuf</title>
<updated>2014-09-02T17:57:14Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-08-30T15:55:45Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=59b8263a6dc3946b62101a9cc9c603a5486cee09'/>
<id>urn:sha1:59b8263a6dc3946b62101a9cc9c603a5486cee09</id>
<content type='text'>
Use strbuf to build the new base, which takes care of allocations and
the terminating NUL character automatically.

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>use xstrfmt to replace xmalloc + sprintf</title>
<updated>2014-06-19T22:20:54Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-19T21:24:33Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=283101869bea8feb5d58f6ea1b568e9b197526d3'/>
<id>urn:sha1:283101869bea8feb5d58f6ea1b568e9b197526d3</id>
<content type='text'>
This is one line shorter, and makes sure the length in the
malloc and sprintf steps match.

These conversions are very straightforward; we can drop the
malloc entirely, and replace the sprintf with xstrfmt.

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 xstrdup instead of xmalloc + strcpy</title>
<updated>2014-06-19T22:20:53Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-19T21:19:43Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=95244ae3dd49b3eed4dbfe09299b9d8847622218'/>
<id>urn:sha1:95244ae3dd49b3eed4dbfe09299b9d8847622218</id>
<content type='text'>
This is one line shorter, and makes sure the length in the
malloc and copy steps match.

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>Rename static function fetch_pack() to http_fetch_pack()</title>
<updated>2012-09-12T18:46:31Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2012-09-09T06:19:38Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=07c19e72c5f07ac687e87e49cbb4e128a8b26629'/>
<id>urn:sha1:07c19e72c5f07ac687e87e49cbb4e128a8b26629</id>
<content type='text'>
Avoid confusion with the non-static function of the same name from
fetch-pack.h.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: make curl callbacks match contracts from curl header</title>
<updated>2011-05-04T20:30:28Z</updated>
<author>
<name>Dan McGee</name>
<email>dpmcgee@gmail.com</email>
</author>
<published>2011-05-03T15:47:27Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a04ff3ec32b8a998a18f8b515ae4c48c1846b327'/>
<id>urn:sha1:a04ff3ec32b8a998a18f8b515ae4c48c1846b327</id>
<content type='text'>
Yes, these don't match perfectly with the void* first parameter of the
fread/fwrite in the standard library, but they do match the curl
expected method signature. This is needed when a refactor passes a
curl_write_callback around, which would otherwise give incorrect
parameter warnings.

Signed-off-by: Dan McGee &lt;dpmcgee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>standardize brace placement in struct definitions</title>
<updated>2011-03-16T19:49:02Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2011-03-16T07:08:34Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=9cba13ca5d233a4e1a7068f3f5ed5836a081dcc0'/>
<id>urn:sha1:9cba13ca5d233a4e1a7068f3f5ed5836a081dcc0</id>
<content type='text'>
In a struct definitions, unlike functions, the prevailing style is for
the opening brace to go on the same line as the struct name, like so:

 struct foo {
	int bar;
	char *baz;
 };

Indeed, grepping for 'struct [a-z_]* {$' yields about 5 times as many
matches as 'struct [a-z_]*$'.

Linus sayeth:

 Heretic people all over the world have claimed that this inconsistency
 is ...  well ...  inconsistent, but all right-thinking people know that
 (a) K&amp;R are _right_ and (b) K&amp;R are right.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
