<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/include/git2/tree.h, branch cmn/reference-transaction</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>treebuilder: don't keep removed entries around</title>
<updated>2014-06-10T13:14:13+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-06-09T20:45:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=978fbb4c345e944004e5a2aede17cdd17ab75356'/>
<id>978fbb4c345e944004e5a2aede17cdd17ab75356</id>
<content type='text'>
If the user wants to keep a copy for themselves, they should make a
copy. It adds unnecessary complexity to make sure the returned entries
are valid until the builder is cleared.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the user wants to keep a copy for themselves, they should make a
copy. It adds unnecessary complexity to make sure the returned entries
are valid until the builder is cleared.
</pre>
</div>
</content>
</entry>
<entry>
<title>treebuilder: use a map instead of vector to store the entries</title>
<updated>2014-06-10T13:14:13+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-06-09T02:38:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=4d3f1f97404b01cd00ad5b2f47f64672d787e901'/>
<id>4d3f1f97404b01cd00ad5b2f47f64672d787e901</id>
<content type='text'>
Finding a filename in a vector means we need to resort it every time we
want to read from it, which includes every time we want to write to it
as well, as we want to find duplicate keys.

A hash-map fits what we want to do much more accurately, as we do not
care about sorting, but just the particular filename.

We still keep removed entries around, as the interface let you assume
they were going to be around until the treebuilder is cleared or freed,
but in this case that involves an append to a vector in the filter case,
which can now fail.

The only time we care about sorting is when we write out the tree, so
let's make that the only time we do any sorting.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Finding a filename in a vector means we need to resort it every time we
want to read from it, which includes every time we want to write to it
as well, as we want to find duplicate keys.

A hash-map fits what we want to do much more accurately, as we do not
care about sorting, but just the particular filename.

We still keep removed entries around, as the interface let you assume
they were going to be around until the treebuilder is cleared or freed,
but in this case that involves an append to a vector in the filter case,
which can now fail.

The only time we care about sorting is when we write out the tree, so
let's make that the only time we do any sorting.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed miscellaneous documentation errors.</title>
<updated>2014-05-23T07:57:20+00:00</updated>
<author>
<name>Michael Anderson</name>
<email>drmikeando@gmail.com</email>
</author>
<published>2014-05-22T09:16:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=31b0cb518f11d4ec8a95df54d077d51b05fa899c'/>
<id>31b0cb518f11d4ec8a95df54d077d51b05fa899c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tree: remove legacy 'oid' naming</title>
<updated>2014-01-25T07:15:44+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-01-24T17:23:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=f000ee4e5b840e9f110123a050777fb1301b19bf'/>
<id>f000ee4e5b840e9f110123a050777fb1301b19bf</id>
<content type='text'>
Rename git_tree_entry_byoid() to _byid() as per the convention.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename git_tree_entry_byoid() to _byid() as per the convention.
</pre>
</div>
</content>
</entry>
<entry>
<title>Align git_tree_entry_dup.</title>
<updated>2014-01-14T20:33:59+00:00</updated>
<author>
<name>Arthur Schreiber</name>
<email>schreiber.arthur@googlemail.com</email>
</author>
<published>2014-01-14T20:33:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=529f342aba858e81f370aca9570fa149ebba674b'/>
<id>529f342aba858e81f370aca9570fa149ebba674b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add git_treebuilder_insert test and clarify doc</title>
<updated>2013-12-12T22:16:40+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2013-12-12T22:16:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=452c7de668568f75a97b0438daab9f33b68d605a'/>
<id>452c7de668568f75a97b0438daab9f33b68d605a</id>
<content type='text'>
This wasn't being tested and since it has a callback, I fixed it
even though the return value of this callback is not treated like
any of the other callbacks in the API.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This wasn't being tested and since it has a callback, I fixed it
even though the return value of this callback is not treated like
any of the other callbacks in the API.
</pre>
</div>
</content>
</entry>
<entry>
<title>tree: allow retrieval of raw attributes</title>
<updated>2013-10-08T08:07:31+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2013-04-15T07:07:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=13f670a5d9d86629f4879f6df9494356e4f28832'/>
<id>13f670a5d9d86629f4879f6df9494356e4f28832</id>
<content type='text'>
When a tool needs to recreate the tree object (for example an
interface to another VCS), it needs to use the raw attributes,
forgoing any normalization.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a tool needs to recreate the tree object (for example an
interface to another VCS), it needs to use the raw attributes,
forgoing any normalization.
</pre>
</div>
</content>
</entry>
<entry>
<title>Small grammar fix in docs</title>
<updated>2013-07-16T03:40:57+00:00</updated>
<author>
<name>Andy Lindeman</name>
<email>andy@andylindeman.com</email>
</author>
<published>2013-07-16T03:40:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=51b0397a66336cd9b45f5562c0fb147052c2e086'/>
<id>51b0397a66336cd9b45f5562c0fb147052c2e086</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed most documentation header bugs</title>
<updated>2013-06-24T13:33:41+00:00</updated>
<author>
<name>Andreas Linde</name>
<email>mail@andreaslinde.de</email>
</author>
<published>2013-06-24T13:33:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=e1967164574816b8bf6740ea17d08eeb26c091d2'/>
<id>e1967164574816b8bf6740ea17d08eeb26c091d2</id>
<content type='text'>
Fixed a few header @param and @return typos with the help of -Wdocumentation in Xcode.

The following warnings have not been fixed:
common.h:213 - Not sure how the documentation format is for '...'
notes.h:102 - Correct @param name but empty text
notes.h:111 - Correct @param name but empty text
pack.h:140 - @return missing text
pack.h:148 - @return missing text
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed a few header @param and @return typos with the help of -Wdocumentation in Xcode.

The following warnings have not been fixed:
common.h:213 - Not sure how the documentation format is for '...'
notes.h:102 - Correct @param name but empty text
notes.h:111 - Correct @param name but empty text
pack.h:140 - @return missing text
pack.h:148 - @return missing text
</pre>
</div>
</content>
</entry>
<entry>
<title>Add cat-file example and increase const use in API</title>
<updated>2013-05-16T17:38:27+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2013-05-16T17:38:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=58206c9ae79af8ef675e30087e5430065b078bbb'/>
<id>58206c9ae79af8ef675e30087e5430065b078bbb</id>
<content type='text'>
This adds an example implementation that emulates git cat-file.
It is a convenient and relatively simple example of getting data
out of a repository.

Implementing this also revealed that there are a number of APIs
that are still not using const pointers to objects that really
ought to be.  The main cause of this is that `git_vector_bsearch`
may need to call `git_vector_sort` before doing the search, so a
const pointer to the vector is not allowed.  However, for tree
objects, with a little care, we can ensure that the vector of
tree entries is always sorted and allow lookups to take a const
pointer.  Also, the missing const in commit objects just looks
like an oversight.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds an example implementation that emulates git cat-file.
It is a convenient and relatively simple example of getting data
out of a repository.

Implementing this also revealed that there are a number of APIs
that are still not using const pointers to objects that really
ought to be.  The main cause of this is that `git_vector_bsearch`
may need to call `git_vector_sort` before doing the search, so a
const pointer to the vector is not allowed.  However, for tree
objects, with a little care, we can ensure that the vector of
tree entries is always sorted and allow lookups to take a const
pointer.  Also, the missing const in commit objects just looks
like an oversight.
</pre>
</div>
</content>
</entry>
</feed>
