<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/tests/apply, branch ethomson/test_https</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>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://91.123.203.49/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>buf: remove internal `git_buf_text` namespace</title>
<updated>2021-05-11T00:29:22+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-05-10T22:04:59+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=d525e063ba4e478cc4afac4cdf60f7acd989dbf2'/>
<id>d525e063ba4e478cc4afac4cdf60f7acd989dbf2</id>
<content type='text'>
The `git_buf_text` namespace is unnecessary and strange.  Remove it,
just keep the functions prefixed with `git_buf`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `git_buf_text` namespace is unnecessary and strange.  Remove it,
just keep the functions prefixed with `git_buf`.
</pre>
</div>
</content>
</entry>
<entry>
<title>apply: ensure we validate paths</title>
<updated>2021-04-28T12:03:33+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-03-20T14:28:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=dbc03de479eec4f96ce3273bf76f49daccbeb496'/>
<id>dbc03de479eec4f96ce3273bf76f49daccbeb496</id>
<content type='text'>
There was no test ensuring that we validate `.git` paths.  We do, but
let's add a test to make sure that we never regress this.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There was no test ensuring that we validate `.git` paths.  We do, but
let's add a test to make sure that we never regress this.
</pre>
</div>
</content>
</entry>
<entry>
<title>apply: add GIT_APPLY_CHECK</title>
<updated>2019-10-22T14:23:24+00:00</updated>
<author>
<name>Drew DeVault</name>
<email>sir@cmpwn.com</email>
</author>
<published>2019-09-14T18:03:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=02af1fcb69b91b3532b8b253ec82cdfce17ef28d'/>
<id>02af1fcb69b91b3532b8b253ec82cdfce17ef28d</id>
<content type='text'>
This adds an option which will check if a diff is applicable without
actually applying it; equivalent to git apply --check.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds an option which will check if a diff is applicable without
actually applying it; equivalent to git apply --check.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #5209 from mkostyuk/apply-wrong-patch</title>
<updated>2019-09-09T11:10:24+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-09-09T11:10:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=c3a7892f30fea72692fafae0e6ff567e5cb8726c'/>
<id>c3a7892f30fea72692fafae0e6ff567e5cb8726c</id>
<content type='text'>
apply: Fix a patch corruption related to EOFNL handling</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
apply: Fix a patch corruption related to EOFNL handling</pre>
</div>
</content>
</entry>
<entry>
<title>apply: Test for EOFNL mishandling when several hunks are processed</title>
<updated>2019-08-28T20:18:31+00:00</updated>
<author>
<name>Max Kostyukevich</name>
<email>maxim.kostyukevich@mera.com</email>
</author>
<published>2019-08-28T20:18:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=585fbd74d2bdd0789c62cb9f12452898a9cbecae'/>
<id>585fbd74d2bdd0789c62cb9f12452898a9cbecae</id>
<content type='text'>
Introduce an unit test to validate that git_apply__patch() properly
handles EOFNL changes in case of patches with several hunks.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce an unit test to validate that git_apply__patch() properly
handles EOFNL changes in case of patches with several hunks.
</pre>
</div>
</content>
</entry>
<entry>
<title>apply: free test data</title>
<updated>2019-08-27T17:10:53+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-08-27T17:10:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=5498c318a247d5ceb8b2cca6838796fa631cf0a6'/>
<id>5498c318a247d5ceb8b2cca6838796fa631cf0a6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>apply: Test for git_apply_to_tree failures when new files are added</title>
<updated>2019-08-21T12:03:50+00:00</updated>
<author>
<name>Max Kostyukevich</name>
<email>maxim.kostyukevich@mera.com</email>
</author>
<published>2019-08-21T12:03:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=dceedbb809cfef67d308a033fb1ffed8b4adebb9'/>
<id>dceedbb809cfef67d308a033fb1ffed8b4adebb9</id>
<content type='text'>
Introduce an unit test to validate if git_apply_to_tree() fails when an
applied patch adds new files.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce an unit test to validate if git_apply_to_tree() fails when an
applied patch adds new files.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: apply: verify that we correctly truncate the source buffer</title>
<updated>2019-02-21T08:24:25+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2019-02-21T07:30:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=966b944095edf9910a332bb73249b5d7d6ebeb2f'/>
<id>966b944095edf9910a332bb73249b5d7d6ebeb2f</id>
<content type='text'>
Previously, we would fail to correctly truncate the source buffer
if the source has more than one line and ends with a non-newline
character. In the following call, we thus truncate the source
string in the middle of the second line. Without the bug fixed,
we would successfully apply the patch to the source and return
success. With the overflow being fixed, we should return an
error now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, we would fail to correctly truncate the source buffer
if the source has more than one line and ends with a non-newline
character. In the following call, we thus truncate the source
string in the middle of the second line. Without the bug fixed,
we would successfully apply the patch to the source and return
success. With the overflow being fixed, we should return an
error now.
</pre>
</div>
</content>
</entry>
<entry>
<title>index: use new enum and structure names</title>
<updated>2018-12-01T10:46:44+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-11-28T13:31:06+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=18e71e6d597abe6c7feb666429c921bd19dc0ba8'/>
<id>18e71e6d597abe6c7feb666429c921bd19dc0ba8</id>
<content type='text'>
Use the new-style index names throughout our own codebase.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the new-style index names throughout our own codebase.
</pre>
</div>
</content>
</entry>
</feed>
