<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src, branch ethomson/update_tips_spec</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>remote: add git_refspec to update_tips</title>
<updated>2023-05-11T12:30:08+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2023-05-10T21:50:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=0e7ab1c4968629b8d42c193eebda48ef146d8e77'/>
<id>0e7ab1c4968629b8d42c193eebda48ef146d8e77</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 #6557 from libgit2/ethomson/shallow</title>
<updated>2023-05-09T19:38:04+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2023-05-09T19:38:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=2bbcdee6b666f34e83d1cf9ca9badc66258202d6'/>
<id>2bbcdee6b666f34e83d1cf9ca9badc66258202d6</id>
<content type='text'>
Shallow (#6396) with some fixes from review</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Shallow (#6396) with some fixes from review</pre>
</div>
</content>
</entry>
<entry>
<title>fetch: remove `unshallow` option</title>
<updated>2023-05-09T16:14:08+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2023-05-08T09:17:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=437c5f5a0b6ae6068168081ac6422dba44cff31d'/>
<id>437c5f5a0b6ae6068168081ac6422dba44cff31d</id>
<content type='text'>
The `depth` field is suitable to specify unshallowing; provide an enum
to aide in specifying the `unshallow` value.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `depth` field is suitable to specify unshallowing; provide an enum
to aide in specifying the `unshallow` value.
</pre>
</div>
</content>
</entry>
<entry>
<title>oid: use an oid array instead of shallowarray</title>
<updated>2023-05-09T16:14:08+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2023-05-08T09:07:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=0a7e32b2326c02a91f9560dfd209e56ea9fb9d49'/>
<id>0a7e32b2326c02a91f9560dfd209e56ea9fb9d49</id>
<content type='text'>
Users should provide us an array of object ids; we don't need a separate
type. And especially, we should not be mutating user-providing values.
Instead, use `git_oid *` in the shallow code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Users should provide us an array of object ids; we don't need a separate
type. And especially, we should not be mutating user-providing values.
Instead, use `git_oid *` in the shallow code.
</pre>
</div>
</content>
</entry>
<entry>
<title>util: detect all possible qsort_r and qsort_s variants</title>
<updated>2023-05-08T18:29:26+00:00</updated>
<author>
<name>Dimitry Andric</name>
<email>dimitry@andric.com</email>
</author>
<published>2023-05-03T20:47:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=d873966fdeae7f0ac974318ce21772af555f1660'/>
<id>d873966fdeae7f0ac974318ce21772af555f1660</id>
<content type='text'>
As reported in https://bugs.freebsd.org/271234, recent versions of
FreeBSD have adjusted the prototype for qsort_r() to match the POSIX
interface. This causes libgit2's CMake configuration check to fail to
detect qsort_r(), making it fall back to qsort_s(), which in libgit2
also has an incompatible interface. With recent versions of clang this
results in a "incompatible function pointer types" compile error.

Summarizing, there are four variations of 'qsort-with-context':
* old style BSD qsort_r(), used in FreeBSD 13 and earlier, where the
  comparison function has the context parameter first
* GNU or POSIX qsort_r(), also used in FreeBSD 14 and later, where the
  comparison function has the context parameter last
* C11 qsort_s(), where the comparison function has the context parameter
  last
* Microsoft qsort_s(), where the comparison function has the context
  parameter first

Add explicit detections for all these variants, so they get detected as
(in the same order as above):

* `GIT_QSORT_R_BSD`
* `GIT_QSORT_R_GNU`
* `GIT_QSORT_S_C11`
* `GIT_QSORT_S_MSC`

An additional complication is that on FreeBSD 14 and later, &lt;stdlib.h&gt;
uses the C11 _Generic() macro mechanism to automatically select the
correct qsort_r() prototype, depending on the caller's comparison
function argument. This breaks CMake's check_prototype_definition()
functionality, since it tries to redefine the function, and _Generic
macro is expanded inline causing a compile error.

Work around that problem by putting the function names in parentheses,
to prevent the preprocessor from using a macro to replace the function
name.

Also, in `git__qsort_r()`, change the `#if` order so the variants that
do not have to use glue are preferred.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As reported in https://bugs.freebsd.org/271234, recent versions of
FreeBSD have adjusted the prototype for qsort_r() to match the POSIX
interface. This causes libgit2's CMake configuration check to fail to
detect qsort_r(), making it fall back to qsort_s(), which in libgit2
also has an incompatible interface. With recent versions of clang this
results in a "incompatible function pointer types" compile error.

Summarizing, there are four variations of 'qsort-with-context':
* old style BSD qsort_r(), used in FreeBSD 13 and earlier, where the
  comparison function has the context parameter first
* GNU or POSIX qsort_r(), also used in FreeBSD 14 and later, where the
  comparison function has the context parameter last
* C11 qsort_s(), where the comparison function has the context parameter
  last
* Microsoft qsort_s(), where the comparison function has the context
  parameter first

Add explicit detections for all these variants, so they get detected as
(in the same order as above):

* `GIT_QSORT_R_BSD`
* `GIT_QSORT_R_GNU`
* `GIT_QSORT_S_C11`
* `GIT_QSORT_S_MSC`

An additional complication is that on FreeBSD 14 and later, &lt;stdlib.h&gt;
uses the C11 _Generic() macro mechanism to automatically select the
correct qsort_r() prototype, depending on the caller's comparison
function argument. This breaks CMake's check_prototype_definition()
functionality, since it tries to redefine the function, and _Generic
macro is expanded inline causing a compile error.

Work around that problem by putting the function names in parentheses,
to prevent the preprocessor from using a macro to replace the function
name.

Also, in `git__qsort_r()`, change the `#if` order so the variants that
do not have to use glue are preferred.
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: add --depth option to clone</title>
<updated>2023-05-08T14:06:41+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2023-04-25T12:29:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=04cddffea9d00d5788b4f41a7dce3356089228ab'/>
<id>04cddffea9d00d5788b4f41a7dce3356089228ab</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>grafts: make `from_file` be `open_or_refresh`</title>
<updated>2023-05-08T14:06:41+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2023-04-25T09:48:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=43db928895fa85e4ee104dc8757275400d5acc2a'/>
<id>43db928895fa85e4ee104dc8757275400d5acc2a</id>
<content type='text'>
The semantics of `from_file` are weird - it looks like a function that
just opens a file, but it actually inspects the pointer, which is
unexpected and could make things very crashy.

Make an `open` function that just does an open, and move the magic to
`open_or_refresh` whose name better indicates that it may do weird
stuff.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The semantics of `from_file` are weird - it looks like a function that
just opens a file, but it actually inspects the pointer, which is
unexpected and could make things very crashy.

Make an `open` function that just does an open, and move the magic to
`open_or_refresh` whose name better indicates that it may do weird
stuff.
</pre>
</div>
</content>
</entry>
<entry>
<title>shallow: don't default to -1 for depth</title>
<updated>2023-05-08T14:06:41+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2023-04-25T08:31:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=3388f5ba1b821e9683d21ca41c34ed752d2db222'/>
<id>3388f5ba1b821e9683d21ca41c34ed752d2db222</id>
<content type='text'>
Depth of `0` should indicate full depth. Disallow negative values (they
may have a future meaning) and use `0` as the default.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Depth of `0` should indicate full depth. Disallow negative values (they
may have a future meaning) and use `0` as the default.
</pre>
</div>
</content>
</entry>
<entry>
<title>grafts: handle SHA256 graft files</title>
<updated>2023-05-08T14:06:41+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2023-04-24T12:32:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=7d7f3059decbd6b4730bfd09da54726c1b3ed8ea'/>
<id>7d7f3059decbd6b4730bfd09da54726c1b3ed8ea</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>grafts: use `git_parse` to parse object IDs</title>
<updated>2023-05-08T14:06:41+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2023-04-24T12:09:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=69592bde1f2789162b215b612df7c8a13956b722'/>
<id>69592bde1f2789162b215b612df7c8a13956b722</id>
<content type='text'>
Don't mix parsing by hand and using `git_parse` to parse.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't mix parsing by hand and using `git_parse` to parse.
</pre>
</div>
</content>
</entry>
</feed>
