<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/include/git2/refs.h, branch ethomson/gitstr</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>git_reference_create_matching: Treat all-zero OID as "must be absent"</title>
<updated>2021-04-20T13:24:25+00:00</updated>
<author>
<name>David Turner</name>
<email>novalis@novalis.org</email>
</author>
<published>2021-04-15T01:52:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=95b7a6398fe499fb37e49a528292c9ab2e1e8fc9'/>
<id>95b7a6398fe499fb37e49a528292c9ab2e1e8fc9</id>
<content type='text'>
This is pretty useful in avoiding races: I want to create a ref only if
it doesn't already exist.  I can't check first because of TOCTOU -- by
the time I finish the check, someone else might have already created
the ref.  And I can't take a lock because then I can't do the create,
since the create expects to take the lock.

The semantics are inspired by git update-ref, which allows an all-zero old
value to mean that the ref must not exist.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is pretty useful in avoiding races: I want to create a ref only if
it doesn't already exist.  I can't check first because of TOCTOU -- by
the time I finish the check, someone else might have already created
the ref.  And I can't take a lock because then I can't do the create,
since the create expects to take the lock.

The semantics are inspired by git update-ref, which allows an all-zero old
value to mean that the ref must not exist.
</pre>
</div>
</content>
</entry>
<entry>
<title>include: fix typos in comments</title>
<updated>2021-02-22T21:57:16+00:00</updated>
<author>
<name>Tobias Nießen</name>
<email>tniessen@tnie.de</email>
</author>
<published>2021-02-22T21:57:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=25efbc4bd8e021bda4ab5894db436ced60bf34a3'/>
<id>25efbc4bd8e021bda4ab5894db436ced60bf34a3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refs: deprecate git_reference_is_valid_name</title>
<updated>2020-10-25T16:33:27+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-10-11T12:21:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=63460fe4b5616cce01e4b67f0994e2e75415324d'/>
<id>63460fe4b5616cce01e4b67f0994e2e75415324d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refs: introduce git_reference_name_is_valid</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:50:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=29715d4082ef97d54ce2bf24943425f558335796'/>
<id>29715d4082ef97d54ce2bf24943425f558335796</id>
<content type='text'>
Provide a function that can check reference name validity but can also
signal when an error occurs.  Use the name "name_is_valid", which is
more suggestive of checking a given name, rather than "is_valid_name",
which suggests that the function checks the validity of the current
reference's name.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide a function that can check reference name validity but can also
signal when an error occurs.  Use the name "name_is_valid", which is
more suggestive of checking a given name, rather than "is_valid_name",
which suggests that the function checks the validity of the current
reference's name.
</pre>
</div>
</content>
</entry>
<entry>
<title>doc: add missing documentation comments</title>
<updated>2019-06-15T14:15:50+00:00</updated>
<author>
<name>Etienne Samson</name>
<email>samson.etienne@gmail.com</email>
</author>
<published>2019-06-13T18:17:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=764196fffb76b5ddefb378910877c737778cb500'/>
<id>764196fffb76b5ddefb378910877c737778cb500</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>deprecation: move deprecated bits to deprecated.h</title>
<updated>2019-01-25T09:06:50+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-01-23T00:07:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a7d0d14fb03243f571b801804d1b5ac9a2aee725'/>
<id>a7d0d14fb03243f571b801804d1b5ac9a2aee725</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>deprecation: use the enum type in declaration</title>
<updated>2019-01-20T10:49:23+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-01-20T10:49:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=1b2af79e85705da5bce8e737bce9d0890d489853'/>
<id>1b2af79e85705da5bce8e737bce9d0890d489853</id>
<content type='text'>
The C standard does not specify whether an enum is a signed or unsigned
type.  Obviously, any enum that includes negative values _must_ be
signed, but if all values are positive then the compiler is free to
choose signed or unsigned.

Thus, by changing the type signatures to `git_object_t` and declaring
the old `GIT_OBJ_` values as a signed or unsigned int, we risk a
mismatch between what the compiler has chosen for a `git_object_t`'s
type and our type declaration.

Thus, we declare the deprecated values as the enum instead of guessing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The C standard does not specify whether an enum is a signed or unsigned
type.  Obviously, any enum that includes negative values _must_ be
signed, but if all values are positive then the compiler is free to
choose signed or unsigned.

Thus, by changing the type signatures to `git_object_t` and declaring
the old `GIT_OBJ_` values as a signed or unsigned int, we risk a
mismatch between what the compiler has chosen for a `git_object_t`'s
type and our type declaration.

Thus, we declare the deprecated values as the enum instead of guessing.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #4939 from libgit2/ethomson/git_ref</title>
<updated>2019-01-19T01:38:34+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-01-19T01:38:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=1758636b13a7a16df9ad900a0990ed844683c7ee'/>
<id>1758636b13a7a16df9ad900a0990ed844683c7ee</id>
<content type='text'>
Move `git_ref_t` to `git_reference_t`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move `git_ref_t` to `git_reference_t`</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce GIT_CALLBACK macro to enforce cdecl</title>
<updated>2019-01-17T21:17:32+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-01-09T18:25:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=22d2062d954dcb88fa3dc65281d3f3d88ae87d68'/>
<id>22d2062d954dcb88fa3dc65281d3f3d88ae87d68</id>
<content type='text'>
Since we now always build the library with cdecl calling conventions,
our callbacks should be decorated as such so that users will not be able
to provide callbacks defined with other calling conventions.

The `GIT_CALLBACK` macro will inject the `__cdecl` attribute as
appropriate.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since we now always build the library with cdecl calling conventions,
our callbacks should be decorated as such so that users will not be able
to provide callbacks defined with other calling conventions.

The `GIT_CALLBACK` macro will inject the `__cdecl` attribute as
appropriate.
</pre>
</div>
</content>
</entry>
<entry>
<title>references: use full name in type names</title>
<updated>2019-01-17T10:32:29+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-01-16T23:58:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=87fe57889192e8c83d8da8eb916b31bed6931a89'/>
<id>87fe57889192e8c83d8da8eb916b31bed6931a89</id>
<content type='text'>
Update the reference type names from an abbreviation (`git_ref`) to use
the fullname (`git_reference`).  This ensures that we are consistent
with our naming for reference types and functions throughout the
library.

The previous names are now marked as deprecated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update the reference type names from an abbreviation (`git_ref`) to use
the fullname (`git_reference`).  This ensures that we are consistent
with our naming for reference types and functions throughout the
library.

The previous names are now marked as deprecated.
</pre>
</div>
</content>
</entry>
</feed>
