<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/refs.h, branch ethomson/test_https</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/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://trove.baserock.org/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>refs: error checking in internal name validation</title>
<updated>2020-10-25T16:33:27+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-10-11T11:26:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=d70979cf891279e20a00bb04ece2f0ce129dd7e4'/>
<id>d70979cf891279e20a00bb04ece2f0ce129dd7e4</id>
<content type='text'>
Move `git_reference__is_valid_name` to `git_reference__name_is_valid`,
which returns errors and sets an out boolean parameter.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move `git_reference__is_valid_name` to `git_reference__name_is_valid`,
which returns errors and sets an out boolean parameter.
</pre>
</div>
</content>
</entry>
<entry>
<title>refs: remove "master" branch constant</title>
<updated>2020-08-03T10:53:20+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-07-15T21:15:27+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=0ff70f4a4e289344c52e1247133d6eb007a68027'/>
<id>0ff70f4a4e289344c52e1247133d6eb007a68027</id>
<content type='text'>
We don't use "master" as a hardcoded default in as many places; remove
the now unused master branch constant.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't use "master" as a hardcoded default in as many places; remove
the now unused master branch constant.
</pre>
</div>
</content>
</entry>
<entry>
<title>refs: remove function to read HEAD directly</title>
<updated>2020-07-12T16:12:16+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2020-06-17T12:57:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=5434f9a363cd9eee1866033da23c9bc7446232b1'/>
<id>5434f9a363cd9eee1866033da23c9bc7446232b1</id>
<content type='text'>
With the last user of `git_reference__read_head` gone, let's remove it
as it's been reading references without consulting the refdb backends.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the last user of `git_reference__read_head` gone, let's remove it
as it's been reading references without consulting the refdb backends.
</pre>
</div>
</content>
</entry>
<entry>
<title>refs: add missing function declaration</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:42:26+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=fd1f09408cc7905e0d607c1adb5b41c1d0073420'/>
<id>fd1f09408cc7905e0d607c1adb5b41c1d0073420</id>
<content type='text'>
The function `git_reference__is_note` is not declared anywhere. Let's
add the declaration to avoid having non-static functions without
declaration.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function `git_reference__is_note` is not declared anywhere. Let's
add the declaration to avoid having non-static functions without
declaration.
</pre>
</div>
</content>
</entry>
<entry>
<title>refs: rename git_reference__set_name to git_reference__realloc</title>
<updated>2019-12-13T11:01:10+00:00</updated>
<author>
<name>Etienne Samson</name>
<email>samson.etienne@gmail.com</email>
</author>
<published>2019-12-08T14:25:52+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=97b8491b01e99790a9f643a9571baf65fe168ba8'/>
<id>97b8491b01e99790a9f643a9571baf65fe168ba8</id>
<content type='text'>
As git_reference__name will reallocate storage to account for longer
names (it's actually allocator-dependent), it will cause all existing
pointers to the old object to become dangling, as they now point to
freed memory.

Fix the issue by renaming to a more descriptive name, and pass a pointer
to the actual reference that can safely be invalidated if the realloc
succeeds.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As git_reference__name will reallocate storage to account for longer
names (it's actually allocator-dependent), it will cause all existing
pointers to the old object to become dangling, as they now point to
freed memory.

Fix the issue by renaming to a more descriptive name, and pass a pointer
to the actual reference that can safely be invalidated if the realloc
succeeds.
</pre>
</div>
</content>
</entry>
<entry>
<title>references: use new names in internal usage</title>
<updated>2019-01-17T10:32:29+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-01-17T00:32:31+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=ed8cfbf04181d6fc229582a09c5c7657a53cd2e3'/>
<id>ed8cfbf04181d6fc229582a09c5c7657a53cd2e3</id>
<content type='text'>
Update internal usage to use the `git_reference` names for constants.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update internal usage to use the `git_reference` names for constants.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge: make analysis possible against a non-HEAD reference</title>
<updated>2018-10-19T18:39:17+00:00</updated>
<author>
<name>Etienne Samson</name>
<email>samson.etienne@gmail.com</email>
</author>
<published>2018-08-25T01:47:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=6e9fb040d9ea521f855257736369f42463cc45e8'/>
<id>6e9fb040d9ea521f855257736369f42463cc45e8</id>
<content type='text'>
This moves the current merge analysis code into a more generic version
that can work against any reference.

Also change the tests to check returned analysis values exactly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This moves the current merge analysis code into a more generic version
that can work against any reference.

Also change the tests to check returned analysis values exactly.
</pre>
</div>
</content>
</entry>
<entry>
<title>refs: preserve the owning refdb when duping reference</title>
<updated>2018-04-10T21:45:00+00:00</updated>
<author>
<name>Etienne Samson</name>
<email>samson.etienne@gmail.com</email>
</author>
<published>2018-04-10T21:16:43+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=5e19a7f9d502a6adb8cabe335020eba08d821c3e'/>
<id>5e19a7f9d502a6adb8cabe335020eba08d821c3e</id>
<content type='text'>
This fixes a segfault in git_reference_owner on references returned from git_reference__read_head and git_reference_dup ones.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a segfault in git_reference_owner on references returned from git_reference__read_head and git_reference_dup ones.</pre>
</div>
</content>
</entry>
<entry>
<title>refs: include " sorted " in our packed-refs header</title>
<updated>2018-01-12T15:17:41+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2018-01-12T15:17:41+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=9bf37ddd07b8212548c30212c994fe267daa876c'/>
<id>9bf37ddd07b8212548c30212c994fe267daa876c</id>
<content type='text'>
This lets git know that we do in fact have written our packed-refs file
sorted (which is apparently not necessarily the case) and it can then use the
new-ish mmaped access which lets it avoid significant amounts of effort parsing
potentially large files to get to a single piece of data.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This lets git know that we do in fact have written our packed-refs file
sorted (which is apparently not necessarily the case) and it can then use the
new-ish mmaped access which lets it avoid significant amounts of effort parsing
potentially large files to get to a single piece of data.
</pre>
</div>
</content>
</entry>
</feed>
