<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/tests/diff, branch ethomson/diff_parse</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>diff::parse: don't include `diff.h`</title>
<updated>2020-06-05T06:17:15+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-05-01T11:39:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=06d69dfcfdfa4eb08cb402ed3a55091eb7d2b97b'/>
<id>06d69dfcfdfa4eb08cb402ed3a55091eb7d2b97b</id>
<content type='text'>
We don't call any internal functions in the test; we don't need to
include `../src/diff.h`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't call any internal functions in the test; we don't need to
include `../src/diff.h`.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff::workdir: actually test the buffers</title>
<updated>2020-05-23T15:27:56+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-05-23T15:27:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=3414d4707ceec7d7b3d632ca03cb0bd8f6ced9a0'/>
<id>3414d4707ceec7d7b3d632ca03cb0bd8f6ced9a0</id>
<content type='text'>
The static test data is erroneously initialized with a length of 0 for
three of the strings.  This means the tests are not actually examining
those strings.  Provide the length.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The static test data is erroneously initialized with a length of 0 for
three of the strings.  This means the tests are not actually examining
those strings.  Provide the length.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: diff: add test to verify behaviour with empty dir ordering</title>
<updated>2020-02-07T14:05:01+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2020-02-04T09:58:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=17670ef25c8e6b4c0e95d5f272e546e20aa984fe'/>
<id>17670ef25c8e6b4c0e95d5f272e546e20aa984fe</id>
<content type='text'>
It was reported that, given a file "abc.txt", a diff will be shown if an
empty directory "abb/" is created, but not if "abd/" is created. Add a
test to verify that we do the right thing here and do not depend on any
ordering.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It was reported that, given a file "abc.txt", a diff will be shown if an
empty directory "abb/" is created, but not if "abd/" is created. Add a
test to verify that we do the right thing here and do not depend on any
ordering.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: diff: verify that we are able to diff with empty subtrees</title>
<updated>2020-02-07T14:05:01+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2020-01-31T08:39:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=b0691db32c1349b1d3ea88f815994d2cd162bed0'/>
<id>b0691db32c1349b1d3ea88f815994d2cd162bed0</id>
<content type='text'>
While it is not allowed for a tree to have an empty tree as child (e.g.
an empty directory), libgit2's tree builder makes it easy to create such
trees. As a result, some applications may inadvertently end up with such
an invalid tree, and we should try our best and handle them.

One such case is when diffing two trees, where one of both trees has
such an empty subtree. It was reported that this will cause our diff
code to fail. While I wasn't able to reproduce this error, let's still
add a test that verifies we continue to handle them correctly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While it is not allowed for a tree to have an empty tree as child (e.g.
an empty directory), libgit2's tree builder makes it easy to create such
trees. As a result, some applications may inadvertently end up with such
an invalid tree, and we should try our best and handle them.

One such case is when diffing two trees, where one of both trees has
such an empty subtree. It was reported that this will cause our diff
code to fail. While I wasn't able to reproduce this error, let's still
add a test that verifies we continue to handle them correctly.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff: make patchid computation work with all types of commits.</title>
<updated>2019-11-28T13:17:50+00:00</updated>
<author>
<name>Gregory Herrero</name>
<email>gregory.herrero@oracle.com</email>
</author>
<published>2019-11-07T13:10:00+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=ece5bb5e7d6e35e50096bac3d7bf17342daaec77'/>
<id>ece5bb5e7d6e35e50096bac3d7bf17342daaec77</id>
<content type='text'>
Current implementation of patchid is not computing a correct patchid
when given a patch where, for example, a new file is added or removed.
Some more corner cases need to be handled to have same behavior as git
patch-id command.
Add some more tests to cover those corner cases.

Signed-off-by: Gregory Herrero &lt;gregory.herrero@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Current implementation of patchid is not computing a correct patchid
when given a patch where, for example, a new file is added or removed.
Some more corner cases need to be handled to have same behavior as git
patch-id command.
Add some more tests to cover those corner cases.

Signed-off-by: Gregory Herrero &lt;gregory.herrero@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>patch_parse: handle patches without extended headers</title>
<updated>2019-10-16T20:53:29+00:00</updated>
<author>
<name>Denis Laxalde</name>
<email>denis@laxalde.org</email>
</author>
<published>2019-10-16T20:11:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=11de594f85479e4804b07dc4f7b33cfe9212bea0'/>
<id>11de594f85479e4804b07dc4f7b33cfe9212bea0</id>
<content type='text'>
Extended header lines (especially the "index &lt;hash&gt;..&lt;hash&gt; &lt;mode&gt;") are
not required by "git apply" so it import patches. So we allow the
from-file/to-file lines (--- a/file\n+++ b/file) to directly follow the
git diff header.

This fixes #5267.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Extended header lines (especially the "index &lt;hash&gt;..&lt;hash&gt; &lt;mode&gt;") are
not required by "git apply" so it import patches. So we allow the
from-file/to-file lines (--- a/file\n+++ b/file) to directly follow the
git diff header.

This fixes #5267.
</pre>
</div>
</content>
</entry>
<entry>
<title>patch_parse: handle patches with new empty files</title>
<updated>2019-09-28T13:52:25+00:00</updated>
<author>
<name>Denis Laxalde</name>
<email>denis@laxalde.org</email>
</author>
<published>2019-09-28T13:52:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=b61810bf1ff1007bc0a5d8e47362a735f2ff1f0b'/>
<id>b61810bf1ff1007bc0a5d8e47362a735f2ff1f0b</id>
<content type='text'>
Patches containing additions of empty files will not contain diff data
but will end with the index header line followed by the terminating
sequence "-- ". We follow the same logic as in cc4c44a and allow "-- "
to immediately follow the index header.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Patches containing additions of empty files will not contain diff data
but will end with the index header line followed by the terminating
sequence "-- ". We follow the same logic as in cc4c44a and allow "-- "
to immediately follow the index header.
</pre>
</div>
</content>
</entry>
<entry>
<title>fileops: rename to "futils.h" to match function signatures</title>
<updated>2019-07-20T17:11:20+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2019-06-29T07:17:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=e54343a4024e75dfaa940e652c2c9799d33634b2'/>
<id>e54343a4024e75dfaa940e652c2c9799d33634b2</id>
<content type='text'>
Our file utils functions all have a "futils" prefix, e.g.
`git_futils_touch`. One would thus naturally guess that their
definitions and implementation would live in files "futils.h" and
"futils.c", respectively, but in fact they live in "fileops.h".

Rename the files to match expectations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Our file utils functions all have a "futils" prefix, e.g.
`git_futils_touch`. One would thus naturally guess that their
definitions and implementation would live in files "futils.h" and
"futils.c", respectively, but in fact they live in "fileops.h".

Rename the files to match expectations.
</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>oid: `is_zero` instead of `iszero`</title>
<updated>2019-06-15T23:16:47+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-06-08T22:28:35+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=5d92e54745eaad2c89aa6457d504411ceee3a4f4'/>
<id>5d92e54745eaad2c89aa6457d504411ceee3a4f4</id>
<content type='text'>
The only function that is named `issomething` (without underscore) was
`git_oid_iszero`.  Rename it to `git_oid_is_zero` for consistency with
the rest of the library.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The only function that is named `issomething` (without underscore) was
`git_oid_iszero`.  Rename it to `git_oid_is_zero` for consistency with
the rest of the library.
</pre>
</div>
</content>
</entry>
</feed>
