<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/diff_print.c, branch ethomson/http_empty_password</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: use GIT_ASSERT</title>
<updated>2020-11-27T11:09:19+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-04-05T13:59:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=5d6c2f26c0edd72cdb582ec23816f4fb70b57982'/>
<id>5d6c2f26c0edd72cdb582ec23816f4fb70b57982</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>buffer: git_buf_sanitize should return a value</title>
<updated>2020-11-25T11:42:03+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-04-05T10:07:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=cb4bfbc99dffa7679f42cf8500931fa250bb7db3'/>
<id>cb4bfbc99dffa7679f42cf8500931fa250bb7db3</id>
<content type='text'>
`git_buf_sanitize` is called with user-input, and wants to sanity-check
that input.  Allow it to return a value if the input was malformed in a
way that we cannot cope.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`git_buf_sanitize` is called with user-input, and wants to sanity-check
that input.  Allow it to return a value if the input was malformed in a
way that we cannot cope.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff_print: adjust code to match current coding style</title>
<updated>2020-06-17T05:34:10+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2020-06-15T12:34:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=6256d023d204007a283c533044a54edff344b4d7'/>
<id>6256d023d204007a283c533044a54edff344b4d7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>diff_print: return out-of-memory situation when printing binary</title>
<updated>2020-06-17T05:34:10+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2020-06-15T12:26:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=490d0c9ceab25b57006b96cd3a4a3cbb95350c7b'/>
<id>490d0c9ceab25b57006b96cd3a4a3cbb95350c7b</id>
<content type='text'>
We currently don't check for out-of-memory situations on exiting
`format_binary` and, as a result, may return a partially filled buffer.
Fix this by checking the buffer via `git_buf_oom`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We currently don't check for out-of-memory situations on exiting
`format_binary` and, as a result, may return a partially filled buffer.
Fix this by checking the buffer via `git_buf_oom`.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff_print: do not call abort(3P)</title>
<updated>2020-06-17T05:34:10+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2020-06-15T11:26:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=bea5fd9f44857ddae2addd543ac5cf444c1280ff'/>
<id>bea5fd9f44857ddae2addd543ac5cf444c1280ff</id>
<content type='text'>
Calling abort(3P) in a library is rather rude and shouldn't happen, as
we effectively prohibit any corrective actions made by the application
linking to it. We thus shouldn't call it at all, but instead use our new
`GIT_ASSERT` macros.

Remove the call to abort(3P) in case a diff delta has an unexpected type
to fix this.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Calling abort(3P) in a library is rather rude and shouldn't happen, as
we effectively prohibit any corrective actions made by the application
linking to it. We thus shouldn't call it at all, but instead use our new
`GIT_ASSERT` macros.

Remove the call to abort(3P) in case a diff delta has an unexpected type
to fix this.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff_print: handle errors when printing to file</title>
<updated>2020-06-17T05:34:10+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2020-06-15T11:19:44+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=0cf1f444edd447aeaf61edefcaf5b31c2d611f7a'/>
<id>0cf1f444edd447aeaf61edefcaf5b31c2d611f7a</id>
<content type='text'>
When printing the diff to a `FILE *` handle, we neither check the return
value of fputc(3P) nor the one of fwrite(3P). As a result, we'll
silently return successful even if we didn't print anything at all.
Futhermore, the arguments to fwrite(3P) are reversed: we have one item
of length `content_len`, and not `content_len` items of one byte.

Fix both issues by checking return values as well as reversing the
arguments to fwrite(3P).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When printing the diff to a `FILE *` handle, we neither check the return
value of fputc(3P) nor the one of fwrite(3P). As a result, we'll
silently return successful even if we didn't print anything at all.
Futhermore, the arguments to fwrite(3P) are reversed: we have one item
of length `content_len`, and not `content_len` items of one byte.

Fix both issues by checking return values as well as reversing the
arguments to fwrite(3P).
</pre>
</div>
</content>
</entry>
<entry>
<title>tree-wide: mark local functions as static</title>
<updated>2020-06-09T12:57:06+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2020-06-08T10:40:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=a6c9e0b367c4882ab0f8e78bd0ad4ab2904ac377'/>
<id>a6c9e0b367c4882ab0f8e78bd0ad4ab2904ac377</id>
<content type='text'>
We've accumulated quite some functions which are never used outside of
their respective code unit, but which are lacking the `static` keyword.
Add it to reduce their linkage scope and allow the compiler to optimize
better.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We've accumulated quite some functions which are never used outside of
their respective code unit, but which are lacking the `static` keyword.
Add it to reduce their linkage scope and allow the compiler to optimize
better.
</pre>
</div>
</content>
</entry>
<entry>
<title>patch: correctly handle mode changes for renames</title>
<updated>2020-03-26T13:21:35+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2020-03-26T13:16:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=5f47cb48d388279f92d339a5a791040254ee4d1c'/>
<id>5f47cb48d388279f92d339a5a791040254ee4d1c</id>
<content type='text'>
When generating a patch for a renamed file whose mode bits have changed
in addition to the rename, then we currently fail to parse the generated
patch. Furthermore, when generating a diff we output mode bits after the
similarity metric, which is different to how upstream git handles it.

Fix both issues by adding another state transition that allows
similarity indices after mode changes and by printing mode changes
before the similarity index.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When generating a patch for a renamed file whose mode bits have changed
in addition to the rename, then we currently fail to parse the generated
patch. Furthermore, when generating a diff we output mode bits after the
similarity metric, which is different to how upstream git handles it.

Fix both issues by adding another state transition that allows
similarity indices after mode changes and by printing mode changes
before the similarity index.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff_print: add support for GIT_DIFF_FORMAT_PATCH_ID.</title>
<updated>2019-11-19T08:33:12+00:00</updated>
<author>
<name>Gregory Herrero</name>
<email>gregory.herrero@oracle.com</email>
</author>
<published>2019-11-07T12:08:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=b921964b25c14c8dfeb26d1a5efedb28ee9e7284'/>
<id>b921964b25c14c8dfeb26d1a5efedb28ee9e7284</id>
<content type='text'>
Git is generating patch-id using a stripped down version of a patch
where hunk header and index information are not present.

Signed-off-by: Gregory Herrero &lt;gregory.herrero@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Git is generating patch-id using a stripped down version of a patch
where hunk header and index information are not present.

Signed-off-by: Gregory Herrero &lt;gregory.herrero@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>diff_print: add a new 'print_index' flag when printing diff.</title>
<updated>2019-11-19T08:32:23+00:00</updated>
<author>
<name>Gregory Herrero</name>
<email>gregory.herrero@oracle.com</email>
</author>
<published>2019-11-07T12:02:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=accd78486523ef875a941ed65b02c56902074d76'/>
<id>accd78486523ef875a941ed65b02c56902074d76</id>
<content type='text'>
Add a new 'print_index' flag to let the caller decide whether or not
'index &lt;oid&gt;..&lt;oid&gt;' should be printed.
Since patch id needs not to have index when hashing a patch, it will be
useful soon.

Signed-off-by: Gregory Herrero &lt;gregory.herrero@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new 'print_index' flag to let the caller decide whether or not
'index &lt;oid&gt;..&lt;oid&gt;' should be printed.
Since patch id needs not to have index when hashing a patch, it will be
useful soon.

Signed-off-by: Gregory Herrero &lt;gregory.herrero@oracle.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
