<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/pack-objects.c, branch ethomson/github_actions</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/'/>
<entry>
<title>tree-wide: mark local functions as static</title>
<updated>2020-06-09T12:57:06+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2020-06-08T10:40:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=a6c9e0b367c4882ab0f8e78bd0ad4ab2904ac377'/>
<id>a6c9e0b367c4882ab0f8e78bd0ad4ab2904ac377</id>
<content type='text'>
We've accumulated quite some functions which are never used outside of
their respective code unit, but which are lacking the `static` keyword.
Add it to reduce their linkage scope and allow the compiler to optimize
better.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We've accumulated quite some functions which are never used outside of
their respective code unit, but which are lacking the `static` keyword.
Add it to reduce their linkage scope and allow the compiler to optimize
better.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #5532 from joshtriplett/pack-default-path</title>
<updated>2020-06-02T11:21:22+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-06-02T11:21:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=6de8aa7f3144efe10d706bca513c8add24e8f407'/>
<id>6de8aa7f3144efe10d706bca513c8add24e8f407</id>
<content type='text'>
git_packbuilder_write: Allow setting path to NULL to use the default path</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git_packbuilder_write: Allow setting path to NULL to use the default path</pre>
</div>
</content>
</entry>
<entry>
<title>git_pool_init: handle failure cases</title>
<updated>2020-06-01T12:12:17+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-05-23T09:15:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=0f35efeb5722f950218e3649d7814a6a91b1c351'/>
<id>0f35efeb5722f950218e3649d7814a6a91b1c351</id>
<content type='text'>
Propagate failures caused by pool initialization errors.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Propagate failures caused by pool initialization errors.
</pre>
</div>
</content>
</entry>
<entry>
<title>git_packbuilder_write: Allow setting path to NULL to use the default path</title>
<updated>2020-05-23T23:07:54+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2020-05-23T23:07:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=5278a0061100e2527e83f4cb159b40fc58bc786c'/>
<id>5278a0061100e2527e83f4cb159b40fc58bc786c</id>
<content type='text'>
If given a NULL path, write to the object path of the repository.

Add tests for the new behavior.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If given a NULL path, write to the object path of the repository.

Add tests for the new behavior.
</pre>
</div>
</content>
</entry>
<entry>
<title>git_packbuilder_write: Unify cleanup path</title>
<updated>2020-05-23T22:35:38+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2020-05-23T22:35:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=0bc091ddb231b201ce22294cd529d37ae40b25cc'/>
<id>0bc091ddb231b201ce22294cd529d37ae40b25cc</id>
<content type='text'>
Clean up and return via a single label, to avoid duplicate error
handling before each return, and to make it easier to extend the set of
cleanups needed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clean up and return via a single label, to avoid duplicate error
handling before each return, and to make it easier to extend the set of
cleanups needed.
</pre>
</div>
</content>
</entry>
<entry>
<title>pack-objects: check return code of `git_zstream_set_input`</title>
<updated>2020-02-07T12:08:23+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2020-02-07T11:13:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=b169cd522e796de3d47d5725d73ab5a0ed88ccf6'/>
<id>b169cd522e796de3d47d5725d73ab5a0ed88ccf6</id>
<content type='text'>
While `git_zstream_set_input` cannot fail right now, it might change in
the future if we ever decide to have it check its parameters more
vigorously. Let's thus check whether its return code signals an error.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While `git_zstream_set_input` cannot fail right now, it might change in
the future if we ever decide to have it check its parameters more
vigorously. Let's thus check whether its return code signals an error.
</pre>
</div>
</content>
</entry>
<entry>
<title>configuration: cvar -&gt; configmap</title>
<updated>2019-07-18T11:53:41+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2019-07-18T11:53:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=658022c41affc7d9b5bd9b84b1d75ec909b820c6'/>
<id>658022c41affc7d9b5bd9b84b1d75ec909b820c6</id>
<content type='text'>
`cvar` is an unhelpful name.  Refactor its usage to `configmap` for more
clarity.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`cvar` is an unhelpful name.  Refactor its usage to `configmap` for more
clarity.
</pre>
</div>
</content>
</entry>
<entry>
<title>pack-objects: allocate memory more efficiently</title>
<updated>2019-07-17T13:37:41+00:00</updated>
<author>
<name>brian m. carlson</name>
<email>bk2204@github.com</email>
</author>
<published>2019-07-16T21:54:10+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=c4df926b32d65f3e84da316bc1fa858e09baa1ac'/>
<id>c4df926b32d65f3e84da316bc1fa858e09baa1ac</id>
<content type='text'>
The packbuilder code allocates memory in chunks. When it needs to
allocate, it tries to add 1024 to the number of objects and multiply by
3/2. However, it actually multiplies by 1 instead, since it performs an
integral division in the expression "3 / 2" and only then multiplies by
the increased number of objects.

The current behavior causes the code to waste massive amounts of time
copying memory when it reallocates, causing inserting all non-blob
objects in the Linux repository into a new pack to take some
indeterminate time greater than 5 minutes instead of 52 seconds.

Correct this error by first dividing by two, and only then multiplying
by 3. We still check for overflow for the multiplication, which is the
only part that can overflow. This appears to be the only place in the
code base which has this problem.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The packbuilder code allocates memory in chunks. When it needs to
allocate, it tries to add 1024 to the number of objects and multiply by
3/2. However, it actually multiplies by 1 instead, since it performs an
integral division in the expression "3 / 2" and only then multiplies by
the increased number of objects.

The current behavior causes the code to waste massive amounts of time
copying memory when it reallocates, causing inserting all non-blob
objects in the Linux repository into a new pack to take some
indeterminate time greater than 5 minutes instead of 52 seconds.

Correct this error by first dividing by two, and only then multiplying
by 3. We still check for overflow for the multiplication, which is the
only part that can overflow. This appears to be the only place in the
code base which has this problem.
</pre>
</div>
</content>
</entry>
<entry>
<title>indexer: use git_indexer_progress throughout</title>
<updated>2019-02-22T11:25:14+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-02-21T10:33:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=a1ef995dc03379fb1f5151b5d98d16644218c95e'/>
<id>a1ef995dc03379fb1f5151b5d98d16644218c95e</id>
<content type='text'>
Update internal usage of `git_transfer_progress` to
`git_indexer_progreses`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update internal usage of `git_transfer_progress` to
`git_indexer_progreses`.
</pre>
</div>
</content>
</entry>
<entry>
<title>oidmap: introduce high-level setter for key/value pairs</title>
<updated>2019-02-15T12:16:48+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2019-01-23T09:48:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=2e0a304839764236654e73d38fa380b317a3fac1'/>
<id>2e0a304839764236654e73d38fa380b317a3fac1</id>
<content type='text'>
Currently, one would use either `git_oidmap_insert` to insert key/value pairs
into a map or `git_oidmap_put` to insert a key only. These function have
historically been macros, which is why their syntax is kind of weird: instead of
returning an error code directly, they instead have to be passed a pointer to
where the return value shall be stored. This does not match libgit2's common
idiom of directly returning error codes.Furthermore, `git_oidmap_put` is tightly
coupled with implementation details of the map as it exposes the index of
inserted entries.

Introduce a new function `git_oidmap_set`, which takes as parameters the map,
key and value and directly returns an error code. Convert all trivial callers of
`git_oidmap_insert` and `git_oidmap_put` to make use of it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, one would use either `git_oidmap_insert` to insert key/value pairs
into a map or `git_oidmap_put` to insert a key only. These function have
historically been macros, which is why their syntax is kind of weird: instead of
returning an error code directly, they instead have to be passed a pointer to
where the return value shall be stored. This does not match libgit2's common
idiom of directly returning error codes.Furthermore, `git_oidmap_put` is tightly
coupled with implementation details of the map as it exposes the index of
inserted entries.

Introduce a new function `git_oidmap_set`, which takes as parameters the map,
key and value and directly returns an error code. Convert all trivial callers of
`git_oidmap_insert` and `git_oidmap_put` to make use of it.
</pre>
</div>
</content>
</entry>
</feed>
