<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/tests/apply/both.c, branch ethomson/https_proxy</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>tests: apply: fix missing `cl_git_pass` wrappers</title>
<updated>2018-11-13T13:08:49+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-11-13T13:08:49+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=fe215153083401608b643213474b5979018abfa0'/>
<id>fe215153083401608b643213474b5979018abfa0</id>
<content type='text'>
Some function calls in the new "apply" test suite were missing the
checks whether they succeeded as expected. Fix this by adding the
missing `cl_git_pass` wrappers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some function calls in the new "apply" test suite were missing the
checks whether they succeeded as expected. Fix this by adding the
missing `cl_git_pass` wrappers.
</pre>
</div>
</content>
</entry>
<entry>
<title>test: ensure applying a patch can't delete a file twice</title>
<updated>2018-11-05T16:13:37+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-11-05T15:49:11+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=4e746d80d229a77b08c5689a64d880bde5fd960f'/>
<id>4e746d80d229a77b08c5689a64d880bde5fd960f</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 re-adding a file after removing it</title>
<updated>2018-11-05T16:13:37+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-11-05T15:46:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=f8b9493b521494f0fd928bf4708abd7450fcea44'/>
<id>f8b9493b521494f0fd928bf4708abd7450fcea44</id>
<content type='text'>
Ensure that we can add a file back after it's been removed.  Update the
renamed/deleted validation in application to not apply to deltas that
are adding files to support this.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure that we can add a file back after it's been removed.  Update the
renamed/deleted validation in application to not apply to deltas that
are adding files to support this.
</pre>
</div>
</content>
</entry>
<entry>
<title>apply: test modifying a file after renaming it</title>
<updated>2018-11-05T16:13:37+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-11-05T15:34:59+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=78580ad31031ddb850de002a02338f160186e247'/>
<id>78580ad31031ddb850de002a02338f160186e247</id>
<content type='text'>
Ensure that we cannot modify a file after it's been renamed out of the
way.  If multiple deltas exist for a single path, ensure that we do not
attempt to modify a file after it's been renamed out of the way.

To support this, we must track the paths that have been removed or
renamed; add to a string map when we remove a path and remove from the
string map if we recreate a path.  Validate that we are not applying to
a path that is in this map, unless the delta is a rename, since git
supports renaming one file to two different places in two different
deltas.

Further, test that we cannot apply a modification delta to a path that
will be created in the future by a rename (a path that does not yet
exist.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure that we cannot modify a file after it's been renamed out of the
way.  If multiple deltas exist for a single path, ensure that we do not
attempt to modify a file after it's been renamed out of the way.

To support this, we must track the paths that have been removed or
renamed; add to a string map when we remove a path and remove from the
string map if we recreate a path.  Validate that we are not applying to
a path that is in this map, unless the delta is a rename, since git
supports renaming one file to two different places in two different
deltas.

Further, test that we cannot apply a modification delta to a path that
will be created in the future by a rename (a path that does not yet
exist.)
</pre>
</div>
</content>
</entry>
<entry>
<title>apply: test renaming a file after modifying it</title>
<updated>2018-11-05T15:53:59+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-11-05T14:37:35+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=605066eee9deac246db0dcef7737297f8e27b20a'/>
<id>605066eee9deac246db0dcef7737297f8e27b20a</id>
<content type='text'>
Multiple deltas can exist in a diff, and can be applied in-order.
If there exists a delta that modifies a file followed by a delta that
renames that file, then both will be captured.  The modification delta
will be applied and the resulting file will be staged with the original
filename.  The rename delta will be independently applied - to the
original file (not the modified file from the original delta) and staged
independently.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Multiple deltas can exist in a diff, and can be applied in-order.
If there exists a delta that modifies a file followed by a delta that
renames that file, then both will be captured.  The modification delta
will be applied and the resulting file will be staged with the original
filename.  The rename delta will be independently applied - to the
original file (not the modified file from the original delta) and staged
independently.
</pre>
</div>
</content>
</entry>
<entry>
<title>apply: test that we can't rename a file after modifying it</title>
<updated>2018-11-05T15:53:59+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-11-04T19:01:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=bd682f3ee4bc6593470d65f69a0e734fd0ae88eb'/>
<id>bd682f3ee4bc6593470d65f69a0e734fd0ae88eb</id>
<content type='text'>
Multiple deltas can exist in a diff, and can be applied in-order.
However if there exists a delta that renames a file, it must be first,
so that other deltas can reference the resulting target file.

git enforces this (`error: already exists in index`), so ensure that we
do, too.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Multiple deltas can exist in a diff, and can be applied in-order.
However if there exists a delta that renames a file, it must be first,
so that other deltas can reference the resulting target file.

git enforces this (`error: already exists in index`), so ensure that we
do, too.
</pre>
</div>
</content>
</entry>
<entry>
<title>apply: test modify delta after rename delta</title>
<updated>2018-11-05T15:53:59+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-11-04T14:07:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=a3c1070c6e9f021f1fbd651bb273caaeefa726e2'/>
<id>a3c1070c6e9f021f1fbd651bb273caaeefa726e2</id>
<content type='text'>
Ensure that we can apply a delta after renaming a file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure that we can apply a delta after renaming a file.
</pre>
</div>
</content>
</entry>
<entry>
<title>apply: test multiple deltas to new file</title>
<updated>2018-11-05T15:53:59+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-11-04T13:14:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=07e71bfa08a87ae8ab9e58abf8c760bb100e885f'/>
<id>07e71bfa08a87ae8ab9e58abf8c760bb100e885f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>apply: handle multiple deltas to the same file</title>
<updated>2018-11-05T15:53:59+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-11-04T13:01:03+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=df4258ade061be35e8940bba27d2d80cdffed8df'/>
<id>df4258ade061be35e8940bba27d2d80cdffed8df</id>
<content type='text'>
git allows a patch file to contain multiple deltas to the same file:
although it does not produce files in this format itself, this could
be the result of concatenating two different patch files that affected
the same file.

git apply behaves by applying this next delta to the existing postimage
of the file.  We should do the same.  If we have previously seen a file,
and produced a postimage for it, we will load that postimage and apply
the current delta to that.  If we have not, get the file from the
preimage.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git allows a patch file to contain multiple deltas to the same file:
although it does not produce files in this format itself, this could
be the result of concatenating two different patch files that affected
the same file.

git apply behaves by applying this next delta to the existing postimage
of the file.  We should do the same.  If we have previously seen a file,
and produced a postimage for it, we will load that postimage and apply
the current delta to that.  If we have not, get the file from the
preimage.
</pre>
</div>
</content>
</entry>
<entry>
<title>apply: test rename 1 to 2</title>
<updated>2018-11-05T15:53:59+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-11-04T12:21:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=c71e964a125ad22f403597037bbd424d72eb5174'/>
<id>c71e964a125ad22f403597037bbd424d72eb5174</id>
<content type='text'>
Test that a patch can contain two deltas that appear to rename an
initial source file to two different destination paths.  Git creates
both target files with the initial source contents; ensure that we do,
too.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test that a patch can contain two deltas that appear to rename an
initial source file to two different destination paths.  Git creates
both target files with the initial source contents; ensure that we do,
too.
</pre>
</div>
</content>
</entry>
</feed>
