<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/include/git2, branch ethomson/util</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-09-30T16:42:46+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=fe07fa64878f3b7dfc7ed2964c3d45fd2fd6be7f'/>
<id>fe07fa64878f3b7dfc7ed2964c3d45fd2fd6be7f</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>Merge pull request #6076 from libgit2/ethomson/oidarray_dispose</title>
<updated>2021-09-27T12:57:03+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-09-27T12:57:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=8c29885e02605bac92148c7e2f8ba0ce95f5bfb1'/>
<id>8c29885e02605bac92148c7e2f8ba0ce95f5bfb1</id>
<content type='text'>
oidarray: introduce `git_oidarray_dispose`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
oidarray: introduce `git_oidarray_dispose`</pre>
</div>
</content>
</entry>
<entry>
<title>oidarray: introduce `git_oidarray_dispose`</title>
<updated>2021-09-26T22:02:07+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-09-26T21:58:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=0bd132ab829f41971355537ecc4f9d24f953ccec'/>
<id>0bd132ab829f41971355537ecc4f9d24f953ccec</id>
<content type='text'>
Since users are disposing the _contents_ of the oidarray, not freeing
the oidarray itself, the proper cleanup function is
`git_oidarray_dispose`.  Deprecate `git_oidarray_free`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since users are disposing the _contents_ of the oidarray, not freeing
the oidarray itself, the proper cleanup function is
`git_oidarray_dispose`.  Deprecate `git_oidarray_free`.
</pre>
</div>
</content>
</entry>
<entry>
<title>repository: improve `hashfile` for absolute paths</title>
<updated>2021-09-25T13:39:01+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-09-24T19:23:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=0f4256b8d78cf602192e0546d185953ee1b30fd5'/>
<id>0f4256b8d78cf602192e0546d185953ee1b30fd5</id>
<content type='text'>
When `git_repository_hashfile` is handed an absolute path, it determines
whether the path is within the repository's working directory or not.
This is necessary when there is no `as_path` specified.

If the path is within the working directory, then the given path should
be used for attribute lookups (it is the effective `as_path`).  If it is
not within the working directory, then it is _not_ eligible.

Importantly, now we will _never_ pass an absolute path down to attribute
lookup functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When `git_repository_hashfile` is handed an absolute path, it determines
whether the path is within the repository's working directory or not.
This is necessary when there is no `as_path` specified.

If the path is within the working directory, then the given path should
be used for attribute lookups (it is the effective `as_path`).  If it is
not within the working directory, then it is _not_ eligible.

Importantly, now we will _never_ pass an absolute path down to attribute
lookup functions.
</pre>
</div>
</content>
</entry>
<entry>
<title>v1.3: update version number</title>
<updated>2021-09-22T12:49:24+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-09-22T12:35:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=e7437162ff5d47b2e0d62425517f919904795e5b'/>
<id>e7437162ff5d47b2e0d62425517f919904795e5b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #6068 from libgit2/ethomson/diff_enum</title>
<updated>2021-09-22T12:48:17+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-09-22T12:48:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a5644b8090b2ebc6ee3462cb4fa178971fd5342b'/>
<id>a5644b8090b2ebc6ee3462cb4fa178971fd5342b</id>
<content type='text'>
diff: update `GIT_DIFF_IGNORE_BLANK_LINES`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
diff: update `GIT_DIFF_IGNORE_BLANK_LINES`</pre>
</div>
</content>
</entry>
<entry>
<title>diff: update `GIT_DIFF_IGNORE_BLANK_LINES`</title>
<updated>2021-09-22T00:23:44+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-09-22T00:23:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=1ba7c32709cb7bc1cc0d11d1a87a7d952eb514ae'/>
<id>1ba7c32709cb7bc1cc0d11d1a87a7d952eb514ae</id>
<content type='text'>
`GIT_DIFF_IGNORE_BLANK_LINES` needs to be within a (signed) int, per the
`enum` definition of ISO C.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`GIT_DIFF_IGNORE_BLANK_LINES` needs to be within a (signed) int, per the
`enum` definition of ISO C.
</pre>
</div>
</content>
</entry>
<entry>
<title>filter: use a `git_oid` in filter options, not a pointer</title>
<updated>2021-09-21T15:28:39+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-09-21T15:28:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=90656858ce6ec0f4cba5ba5f8690ace9b83161d0'/>
<id>90656858ce6ec0f4cba5ba5f8690ace9b83161d0</id>
<content type='text'>
Using a `git_oid *` in filter options was a mistake; it is a deviation
from our typical pattern, and callers in some languages that GC may need
very special treatment in order to pass both an options structure and a
pointer outside of it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using a `git_oid *` in filter options was a mistake; it is a deviation
from our typical pattern, and callers in some languages that GC may need
very special treatment in order to pass both an options structure and a
pointer outside of it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #6061 from libgit2/ethomson/email</title>
<updated>2021-09-21T01:45:10+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-09-21T01:45:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=ba01547d4a8190d5e4df317d4b0d0767e160bc57'/>
<id>ba01547d4a8190d5e4df317d4b0d0767e160bc57</id>
<content type='text'>
Introduce `git_email_create`; deprecate `git_diff_format_email`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce `git_email_create`; deprecate `git_diff_format_email`</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #6020 from lolgear/refactoring/stdint_ifdef_condition_has_been_reverted</title>
<updated>2021-09-20T16:36:56+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-09-20T16:36:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=1396a9b556ce60da01c99b009ef91d22e5404702'/>
<id>1396a9b556ce60da01c99b009ef91d22e5404702</id>
<content type='text'>
Stdint header condition has been reverted.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Stdint header condition has been reverted.</pre>
</div>
</content>
</entry>
</feed>
