<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/index.c, branch ethomson/treebuilder_write</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>index: Initialize case_sorted to GIT_VECTOR_INIT</title>
<updated>2021-02-19T00:37:29+00:00</updated>
<author>
<name>panda</name>
<email>daniel.phan36@gmail.com</email>
</author>
<published>2021-02-19T00:36:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=409305081372c7e881dfa8f35a2696366abc712b'/>
<id>409305081372c7e881dfa8f35a2696366abc712b</id>
<content type='text'>
This is for extra safety within write_entries
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is for extra safety within write_entries
</pre>
</div>
</content>
</entry>
<entry>
<title>index: Check git_vector_dup error in write_entries</title>
<updated>2021-02-17T02:32:44+00:00</updated>
<author>
<name>panda</name>
<email>daniel.phan36@gmail.com</email>
</author>
<published>2021-02-16T21:43:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=21981f28627b65d43590166b6a1782bb101dcddd'/>
<id>21981f28627b65d43590166b6a1782bb101dcddd</id>
<content type='text'>
If allocating case_sorted.contents fails, git_vector_sort will segfault.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If allocating case_sorted.contents fails, git_vector_sort will segfault.
</pre>
</div>
</content>
</entry>
<entry>
<title>threads: give atomic functions the git_atomic prefix</title>
<updated>2020-12-06T01:08:22+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-12-05T15:49:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=ab7729747c4b55a93b8973e94429c747fe274529'/>
<id>ab7729747c4b55a93b8973e94429c747fe274529</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>threads: rename git_atomic to git_atomic32</title>
<updated>2020-12-06T01:08:22+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-12-05T15:26:59+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=37763d38fbf5db932be8d6a0070255839e7719ca'/>
<id>37763d38fbf5db932be8d6a0070255839e7719ca</id>
<content type='text'>
Clarify the `git_atomic` type and functions now that we have a 64 bit
version as well (`git_atomic64`).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clarify the `git_atomic` type and functions now that we have a 64 bit
version as well (`git_atomic64`).
</pre>
</div>
</content>
</entry>
<entry>
<title>index: use GIT_ASSERT</title>
<updated>2020-11-27T11:09:20+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-04-05T15:50:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=1fa339be78ad0e07a9220ff091d3f7aaa21502c1'/>
<id>1fa339be78ad0e07a9220ff091d3f7aaa21502c1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make the tests run cleanly under UndefinedBehaviorSanitizer</title>
<updated>2020-06-30T13:23:06+00:00</updated>
<author>
<name>lhchavez</name>
<email>lhchavez@lhchavez.com</email>
</author>
<published>2020-06-27T19:15:26+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=d0656ac80f33d54967425e782cbe71a0f1b963db'/>
<id>d0656ac80f33d54967425e782cbe71a0f1b963db</id>
<content type='text'>
This change makes the tests run cleanly under
`-fsanitize=undefined,nullability` and comprises of:

* Avoids some arithmetic with NULL pointers (which UBSan does not like).
* Avoids an overflow in a shift, due to an uint8_t being implicitly
  converted to a signed 32-bit signed integer after being shifted by a
  32-bit signed integer.
* Avoids a unaligned read in libgit2.
* Ignores unaligned reads in the SHA1 library, since it only happens on
  Intel processors, where it is _still_ undefined behavior, but the
  semantics are moderately well-understood.

Of notable omission is `-fsanitize=integer`, since there are lots of
warnings in zlib and the SHA1 library which probably don't make sense to
fix and I could not figure out how to silence easily. libgit2 itself
also has ~100s of warnings which are mostly innocuous (e.g. use of enum
constants that only fit on an `uint32_t`, but there is no way to do that
in a simple fashion because the data type chosen for enumerated types is
implementation-defined), and investigating whether there are worrying
warnings would need reducing the noise significantly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change makes the tests run cleanly under
`-fsanitize=undefined,nullability` and comprises of:

* Avoids some arithmetic with NULL pointers (which UBSan does not like).
* Avoids an overflow in a shift, due to an uint8_t being implicitly
  converted to a signed 32-bit signed integer after being shifted by a
  32-bit signed integer.
* Avoids a unaligned read in libgit2.
* Ignores unaligned reads in the SHA1 library, since it only happens on
  Intel processors, where it is _still_ undefined behavior, but the
  semantics are moderately well-understood.

Of notable omission is `-fsanitize=integer`, since there are lots of
warnings in zlib and the SHA1 library which probably don't make sense to
fix and I could not figure out how to silence easily. libgit2 itself
also has ~100s of warnings which are mostly innocuous (e.g. use of enum
constants that only fit on an `uint32_t`, but there is no way to do that
in a simple fashion because the data type chosen for enumerated types is
implementation-defined), and investigating whether there are worrying
warnings would need reducing the noise significantly.
</pre>
</div>
</content>
</entry>
<entry>
<title>tree-wide: do not compile deprecated functions with hard deprecation</title>
<updated>2020-06-09T12:57:06+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2020-06-08T19:07:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=c6184f0c4b209e462bf3f42ab20df2d13d8ee918'/>
<id>c6184f0c4b209e462bf3f42ab20df2d13d8ee918</id>
<content type='text'>
When compiling libgit2 with -DDEPRECATE_HARD, we add a preprocessor
definition `GIT_DEPRECATE_HARD` which causes the "git2/deprecated.h"
header to be empty. As a result, no function declarations are made
available to callers, but the implementations are still available to
link against. This has the problem that function declarations also
aren't visible to the implementations, meaning that the symbol's
visibility will not be set up correctly. As a result, the resulting
library may not expose those deprecated symbols at all on some platforms
and thus cause linking errors.

Fix the issue by conditionally compiling deprecated functions, only.
While it becomes impossible to link against such a library in case one
uses deprecated functions, distributors of libgit2 aren't expected to
pass -DDEPRECATE_HARD anyway. Instead, users of libgit2 should manually
define GIT_DEPRECATE_HARD to hide deprecated functions. Using "real"
hard deprecation still makes sense in the context of CI to test we don't
use deprecated symbols ourselves and in case a dependant uses libgit2 in
a vendored way and knows it won't ever use any of the deprecated symbols
anyway.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When compiling libgit2 with -DDEPRECATE_HARD, we add a preprocessor
definition `GIT_DEPRECATE_HARD` which causes the "git2/deprecated.h"
header to be empty. As a result, no function declarations are made
available to callers, but the implementations are still available to
link against. This has the problem that function declarations also
aren't visible to the implementations, meaning that the symbol's
visibility will not be set up correctly. As a result, the resulting
library may not expose those deprecated symbols at all on some platforms
and thus cause linking errors.

Fix the issue by conditionally compiling deprecated functions, only.
While it becomes impossible to link against such a library in case one
uses deprecated functions, distributors of libgit2 aren't expected to
pass -DDEPRECATE_HARD anyway. Instead, users of libgit2 should manually
define GIT_DEPRECATE_HARD to hide deprecated functions. Using "real"
hard deprecation still makes sense in the context of CI to test we don't
use deprecated symbols ourselves and in case a dependant uses libgit2 in
a vendored way and knows it won't ever use any of the deprecated symbols
anyway.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #5526 from libgit2/ethomson/poolinit</title>
<updated>2020-06-01T13:05:51+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2020-06-01T13:05:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=17641f1f82ce6e6d2a52952a896525572c7fc7da'/>
<id>17641f1f82ce6e6d2a52952a896525572c7fc7da</id>
<content type='text'>
git_pool_init: allow the function to fail</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git_pool_init: allow the function to fail</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>index: write v4: bugfix: prefix path with strip_len, not same_len</title>
<updated>2020-05-25T21:36:17+00:00</updated>
<author>
<name>Patrick Wang</name>
<email>mail6543210@yahoo.com.tw</email>
</author>
<published>2020-05-25T20:53:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=8c96d56dd0af7e7186a93915c33eda6758a9da3c'/>
<id>8c96d56dd0af7e7186a93915c33eda6758a9da3c</id>
<content type='text'>
According to index-format.txt of git, the path of an entry is prefixed
with N, where N indicates the length of bytes to be stripped.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to index-format.txt of git, the path of an entry is prefixed
with N, where N indicates the length of bytes to be stripped.
</pre>
</div>
</content>
</entry>
</feed>
