<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git, branch ethomson/assert_macros</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>assert: allow non-int returning functions to assert</title>
<updated>2020-05-11T19:13:54+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-04-01T21:12:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=cbae1c219d97dbc3cb0b88abe3bf6c21d019ebf8'/>
<id>cbae1c219d97dbc3cb0b88abe3bf6c21d019ebf8</id>
<content type='text'>
Include GIT_ASSERT_WITH_RETVAL and GIT_ASSERT_ARG_WITH_RETVAL so that
functions that do not return int (or more precisely, where `-1` would
not be an error code) can assert.

This allows functions that return, eg, NULL on an error code to do that
by passing the return value (in this example, `NULL`) as a second
parameter to the GIT_ASSERT_WITH_RETVAL functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Include GIT_ASSERT_WITH_RETVAL and GIT_ASSERT_ARG_WITH_RETVAL so that
functions that do not return int (or more precisely, where `-1` would
not be an error code) can assert.

This allows functions that return, eg, NULL on an error code to do that
by passing the return value (in this example, `NULL`) as a second
parameter to the GIT_ASSERT_WITH_RETVAL functions.
</pre>
</div>
</content>
</entry>
<entry>
<title>assert: optionally fall-back to assert(3)</title>
<updated>2020-05-11T19:13:54+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-01-12T10:31:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=a95096ba5f72db71422ffd9ea6630160387b97c0'/>
<id>a95096ba5f72db71422ffd9ea6630160387b97c0</id>
<content type='text'>
Fall back to the system assert(3) in debug builds, which may aide
in debugging.

"Safe" assertions can be enabled in debug builds by setting
GIT_ASSERT_HARD=0.  Similarly, hard assertions can be enabled in
release builds by setting GIT_ASSERT_HARD to nonzero.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fall back to the system assert(3) in debug builds, which may aide
in debugging.

"Safe" assertions can be enabled in debug builds by setting
GIT_ASSERT_HARD=0.  Similarly, hard assertions can be enabled in
release builds by setting GIT_ASSERT_HARD to nonzero.
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce GIT_ASSERT macros</title>
<updated>2020-05-11T19:13:54+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-12-09T02:37:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=abe2efe1ff84d423ef5f104b1e95e9ef66442c0f'/>
<id>abe2efe1ff84d423ef5f104b1e95e9ef66442c0f</id>
<content type='text'>
Provide macros to replace usages of `assert`.  A true `assert` is
punishing as a library.  Instead we should do our best to not crash.

GIT_ASSERT_ARG(x) will now assert that the given argument complies to
some format and sets an error message and returns `-1` if it does not.

GIT_ASSERT(x) is for internal usage, and available as an internal
consistency check.  It will set an error message and return `-1` in the
event of failure.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide macros to replace usages of `assert`.  A true `assert` is
punishing as a library.  Instead we should do our best to not crash.

GIT_ASSERT_ARG(x) will now assert that the given argument complies to
some format and sets an error message and returns `-1` if it does not.

GIT_ASSERT(x) is for internal usage, and available as an internal
consistency check.  It will set an error message and return `-1` in the
event of failure.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #5510 from phkelley/stash-to-index-crash</title>
<updated>2020-05-11T08:18:36+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-05-11T08:18:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=b83bc6d4739d10ac3db6513931cedfe8e682f487'/>
<id>b83bc6d4739d10ac3db6513931cedfe8e682f487</id>
<content type='text'>
Fix uninitialized stack memory and NULL ptr dereference in stash_to_index</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix uninitialized stack memory and NULL ptr dereference in stash_to_index</pre>
</div>
</content>
</entry>
<entry>
<title>Fix uninitialized stack memory and NULL ptr dereference in stash_to_index</title>
<updated>2020-05-11T04:44:16+00:00</updated>
<author>
<name>Philip Kelley</name>
<email>phkelley@microsoft.com</email>
</author>
<published>2020-05-11T04:43:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=56c95cf6fb4c6af6ae4ec43460dad09159c4700d'/>
<id>56c95cf6fb4c6af6ae4ec43460dad09159c4700d</id>
<content type='text'>
Caught by static analysis.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Caught by static analysis.
</pre>
</div>
</content>
</entry>
<entry>
<title>checkout: Fix removing untracked files by path in subdirectories</title>
<updated>2020-05-10T23:15:06+00:00</updated>
<author>
<name>Segev Finer</name>
<email>segev@codeocean.com</email>
</author>
<published>2019-06-03T15:35:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=d62e44cb8218840a0291fb5fbb7c5106e1e35a12'/>
<id>d62e44cb8218840a0291fb5fbb7c5106e1e35a12</id>
<content type='text'>
The checkout code didn't iterate into a subdir if it didn't match the
pathspec, but since the pathspec might match files in the subdir we
should recurse into it (In contrast to gitignore handling).

Fixes #5089
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The checkout code didn't iterate into a subdir if it didn't match the
pathspec, but since the pathspec might match files in the subdir we
should recurse into it (In contrast to gitignore handling).

Fixes #5089
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #5378 from libgit2/ethomson/checkout_pathspecs</title>
<updated>2020-05-10T23:09:18+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-05-10T23:09:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=2a1d97e6e7ca0fee3fcc5e86e8bf61ab2f182d64'/>
<id>2a1d97e6e7ca0fee3fcc5e86e8bf61ab2f182d64</id>
<content type='text'>
Honor GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH for all checkout types </content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Honor GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH for all checkout types </pre>
</div>
</content>
</entry>
<entry>
<title>checkout: filter pathspecs for _all_ checkout types</title>
<updated>2020-05-10T22:47:20+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-02-02T19:20:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=63de21283f1c8d4ca415d19088fbdb46076e54d6'/>
<id>63de21283f1c8d4ca415d19088fbdb46076e54d6</id>
<content type='text'>
We were previously applying the pathspec filter for the baseline
iterator during checkout, as well as the target tree.  This was an
oversight; in fact, we should apply the pathspec filter to _all_
checkout targets, not just trees.

Add a helper function to set the iterator pathspecs from the given
checkout pathspecs, and call it everywhere.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We were previously applying the pathspec filter for the baseline
iterator during checkout, as well as the target tree.  This was an
oversight; in fact, we should apply the pathspec filter to _all_
checkout targets, not just trees.

Add a helper function to set the iterator pathspecs from the given
checkout pathspecs, and call it everywhere.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests::checkout: only examine test10 and test11.txt</title>
<updated>2020-05-10T22:47:20+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-02-02T18:01:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=8731e1f4a10a29fe819e3d3011077737e3c7df43'/>
<id>8731e1f4a10a29fe819e3d3011077737e3c7df43</id>
<content type='text'>
The checkout::index::can_disable_pathspec_match test attempts to set a
path filter of `test11.txt` and `test12.txt`, but then validates that
`test10.txt` and `test11.txt` were left unmodified.  Update the test's
path filter to match the expectation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The checkout::index::can_disable_pathspec_match test attempts to set a
path filter of `test11.txt` and `test12.txt`, but then validates that
`test10.txt` and `test11.txt` were left unmodified.  Update the test's
path filter to match the expectation.
</pre>
</div>
</content>
</entry>
<entry>
<title>Create test case demonstrating checkout bug w/ pathspec match disabled</title>
<updated>2020-05-10T22:47:20+00:00</updated>
<author>
<name>Felix Lapalme</name>
<email>lapfelix@users.noreply.github.com</email>
</author>
<published>2020-02-02T06:00:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=24bd12c4f91f841b70bd65252aa25b221bf63eb5'/>
<id>24bd12c4f91f841b70bd65252aa25b221bf63eb5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
