<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/tests/merge/analysis.c, branch ethomson/codespaces</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>str: introduce `git_str` for internal, `git_buf` is external</title>
<updated>2021-10-17T13:49:01+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-09-07T21:53:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=f0e693b18afbe1de37d7da5b5a8967b6c87d8e53'/>
<id>f0e693b18afbe1de37d7da5b5a8967b6c87d8e53</id>
<content type='text'>
libgit2 has two distinct requirements that were previously solved by
`git_buf`.  We require:

1. A general purpose string class that provides a number of utility APIs
   for manipulating data (eg, concatenating, truncating, etc).
2. A structure that we can use to return strings to callers that they
   can take ownership of.

By using a single class (`git_buf`) for both of these purposes, we have
confused the API to the point that refactorings are difficult and
reasoning about correctness is also difficult.

Move the utility class `git_buf` to be called `git_str`: this represents
its general purpose, as an internal string buffer class.  The name also
is an homage to Junio Hamano ("gitstr").

The public API remains `git_buf`, and has a much smaller footprint.  It
is generally only used as an "out" param with strict requirements that
follow the documentation.  (Exceptions exist for some legacy APIs to
avoid breaking callers unnecessarily.)

Utility functions exist to convert a user-specified `git_buf` to a
`git_str` so that we can call internal functions, then converting it
back again.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libgit2 has two distinct requirements that were previously solved by
`git_buf`.  We require:

1. A general purpose string class that provides a number of utility APIs
   for manipulating data (eg, concatenating, truncating, etc).
2. A structure that we can use to return strings to callers that they
   can take ownership of.

By using a single class (`git_buf`) for both of these purposes, we have
confused the API to the point that refactorings are difficult and
reasoning about correctness is also difficult.

Move the utility class `git_buf` to be called `git_str`: this represents
its general purpose, as an internal string buffer class.  The name also
is an homage to Junio Hamano ("gitstr").

The public API remains `git_buf`, and has a much smaller footprint.  It
is generally only used as an "out" param with strict requirements that
follow the documentation.  (Exceptions exist for some legacy APIs to
avoid breaking callers unnecessarily.)

Utility functions exist to convert a user-specified `git_buf` to a
`git_str` so that we can call internal functions, then converting it
back again.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: merge::analysis: use variants to deduplicate test suites</title>
<updated>2019-06-13T09:59:50+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2019-06-13T09:57:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=70fae43c6ce804f0669ba68b17fe9087e6bd58f5'/>
<id>70fae43c6ce804f0669ba68b17fe9087e6bd58f5</id>
<content type='text'>
Since commit 394951ad4 (tests: allow for simple data-driven
tests, 2019-06-07), we have the ability to run a given test suite
with multiple variants. Use this new feature to deduplicate the
test suites for merge::{trees,workdir}::analysis into a single
test suite.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit 394951ad4 (tests: allow for simple data-driven
tests, 2019-06-07), we have the ability to run a given test suite
with multiple variants. Use this new feature to deduplicate the
test suites for merge::{trees,workdir}::analysis into a single
test suite.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix memleaks in analysis tests.</title>
<updated>2019-06-10T10:22:02+00:00</updated>
<author>
<name>Robert Coup</name>
<email>robert@coup.net.nz</email>
</author>
<published>2019-06-10T09:52:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=438c99587ea39a0a1a1dac4888300137ffea3ba1'/>
<id>438c99587ea39a0a1a1dac4888300137ffea3ba1</id>
<content type='text'>
Wrap some missed setup api calls in asserts.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Wrap some missed setup api calls in asserts.
</pre>
</div>
</content>
</entry>
<entry>
<title>Review fixes:</title>
<updated>2019-06-10T10:22:02+00:00</updated>
<author>
<name>Robert Coup</name>
<email>robert@coup.net.nz</email>
</author>
<published>2019-06-07T14:22:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=21ddeabe6cb4a77899a6c7348493a2b45cc82a9c'/>
<id>21ddeabe6cb4a77899a6c7348493a2b45cc82a9c</id>
<content type='text'>
- whitespace -&gt; tabs
- comment style
- improve repo naming in merge/trees/analysis tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- whitespace -&gt; tabs
- comment style
- improve repo naming in merge/trees/analysis tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor testing:</title>
<updated>2019-06-10T10:22:02+00:00</updated>
<author>
<name>Robert Coup</name>
<email>robert@coup.net.nz</email>
</author>
<published>2019-06-06T15:32:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=7b27b6cf716429080fbc968d8f573977996ee112'/>
<id>7b27b6cf716429080fbc968d8f573977996ee112</id>
<content type='text'>
- move duplication between merge/trees/ and merge/workdir/ into merge/analysis{.c,.h}
- remove merge-resolve.git resource, open the existing merge-resolve as a bare repo instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- move duplication between merge/trees/ and merge/workdir/ into merge/analysis{.c,.h}
- remove merge-resolve.git resource, open the existing merge-resolve as a bare repo instead.
</pre>
</div>
</content>
</entry>
</feed>
