<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/include/git2/index.h, branch ethomson/git_ref</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>index: update enum and structure names</title>
<updated>2018-12-01T10:44:16+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-11-14T21:00:25+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=4e892ae5f053c9199ae128997471f5d2b660e361'/>
<id>4e892ae5f053c9199ae128997471f5d2b660e361</id>
<content type='text'>
We have various macro, enumeration and structure names that were
introduced (very) early in the project and do not match our current
naming conventions.  For instance: `GIT_IDXENTRY...` flags that
correspond to a structure named `git_index_entry`.

Update these to match the current guidance.  The old macros and
enumeration names are reflected as new macros in order to support
backward compatibility (and do so without warnings for consumers).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have various macro, enumeration and structure names that were
introduced (very) early in the project and do not match our current
naming conventions.  For instance: `GIT_IDXENTRY...` flags that
correspond to a structure named `git_index_entry`.

Update these to match the current guidance.  The old macros and
enumeration names are reflected as new macros in order to support
backward compatibility (and do so without warnings for consumers).
</pre>
</div>
</content>
</entry>
<entry>
<title>index: introduce git_index_iterator</title>
<updated>2018-11-14T14:03:30+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-11-12T17:22:47+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=c358bbc5e9f60bb169825c84f2f7f0bf9ee34064'/>
<id>c358bbc5e9f60bb169825c84f2f7f0bf9ee34064</id>
<content type='text'>
Provide a public git_index_iterator API that is backed by an index
snapshot.  This allows consumers to provide a stable iteration even
while manipulating the index during iteration.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide a public git_index_iterator API that is backed by an index
snapshot.  This allows consumers to provide a stable iteration even
while manipulating the index during iteration.
</pre>
</div>
</content>
</entry>
<entry>
<title>Minor comment fix</title>
<updated>2017-02-16T15:40:49+00:00</updated>
<author>
<name>David Catmull</name>
<email>dtcatmull@xactware.com</email>
</author>
<published>2017-02-16T15:40:49+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=19874e293491f3864c21234c9aada5bac2856663'/>
<id>19874e293491f3864c21234c9aada5bac2856663</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>index: support index v4</title>
<updated>2016-08-10T18:19:30+00:00</updated>
<author>
<name>David Turner</name>
<email>dturner@twopensource.com</email>
</author>
<published>2016-05-17T19:40:32+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=5625d86b994fd81f1b0d887890e8168d7b5f46cc'/>
<id>5625d86b994fd81f1b0d887890e8168d7b5f46cc</id>
<content type='text'>
Support reading and writing index v4.  Index v4 uses a very simple
compression scheme for pathnames, but is otherwise similar to index v3.

Signed-off-by: David Turner &lt;dturner@twitter.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support reading and writing index v4.  Index v4 uses a very simple
compression scheme for pathnames, but is otherwise similar to index v3.

Signed-off-by: David Turner &lt;dturner@twitter.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>index: also try conflict mode when inserting</title>
<updated>2015-09-30T13:06:09+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2015-09-29T19:49:16+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=21515f228b739a3ecd2237bafbba50e8d219d8dd'/>
<id>21515f228b739a3ecd2237bafbba50e8d219d8dd</id>
<content type='text'>
When we do not trust the on-disk mode, we use the mode of an existing
index entry.  This allows us to preserve executable bits on platforms
that do not honor them on the filesystem.

If there is no stage 0 index entry, also look at conflicts to attempt
to answer this question:  prefer the data from the 'ours' side, then
the 'theirs' side before falling back to the common ancestor.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we do not trust the on-disk mode, we use the mode of an existing
index entry.  This allows us to preserve executable bits on platforms
that do not honor them on the filesystem.

If there is no stage 0 index entry, also look at conflicts to attempt
to answer this question:  prefer the data from the 'ours' side, then
the 'theirs' side before falling back to the common ancestor.
</pre>
</div>
</content>
</entry>
<entry>
<title>New API: git_index_find_prefix</title>
<updated>2015-09-04T16:24:36+00:00</updated>
<author>
<name>Leo Yang</name>
<email>lyang@topologyinc.com</email>
</author>
<published>2015-08-17T19:02:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=c097f7173daced0f86fd816a72ad5fc0f636484a'/>
<id>c097f7173daced0f86fd816a72ad5fc0f636484a</id>
<content type='text'>
Find the first index entry matching a prefix.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Find the first index entry matching a prefix.
</pre>
</div>
</content>
</entry>
<entry>
<title>index: use the checksum to check whether it's been modified</title>
<updated>2015-06-19T20:05:08+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2015-06-19T20:05:08+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=5e947c91d49aacc8abb5b3f018737c72c52486a9'/>
<id>5e947c91d49aacc8abb5b3f018737c72c52486a9</id>
<content type='text'>
We currently use a timetamp to check whether an index file has been
modified since we last read it, but this is racy. If two updates happen
in the same second and we read after the first one, we won't detect the
second one.

Instead read the SHA-1 checksum of the file, which are its last 20 bytes which
gives us a sure-fire way to detect whether the file has changed since we
last read it.

As we're now keeping track of it, expose an accessor to this data.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We currently use a timetamp to check whether an index file has been
modified since we last read it, but this is racy. If two updates happen
in the same second and we read after the first one, we won't detect the
second one.

Instead read the SHA-1 checksum of the file, which are its last 20 bytes which
gives us a sure-fire way to detect whether the file has changed since we
last read it.

As we're now keeping track of it, expose an accessor to this data.
</pre>
</div>
</content>
</entry>
<entry>
<title>introduce `git_index_entry_is_conflict`</title>
<updated>2015-05-28T13:47:31+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2015-05-19T15:23:59+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=9f545b9d71c7bd316be80e5fe8b47135e9deb97e'/>
<id>9f545b9d71c7bd316be80e5fe8b47135e9deb97e</id>
<content type='text'>
It's not always obvious the mapping between stage level and
conflict-ness.  More importantly, this can lead otherwise sane
people to write constructs like `if (!git_index_entry_stage(entry))`,
which (while technically correct) is unreadable.

Provide a nice method to help avoid such messy thinking.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's not always obvious the mapping between stage level and
conflict-ness.  More importantly, this can lead otherwise sane
people to write constructs like `if (!git_index_entry_stage(entry))`,
which (while technically correct) is unreadable.

Provide a nice method to help avoid such messy thinking.
</pre>
</div>
</content>
</entry>
<entry>
<title>conflicts: when adding conflicts, remove staged</title>
<updated>2015-05-28T13:43:49+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2015-05-14T15:52:48+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=ecd60a56ebd6bdc347a486f53da7de0febef58cf'/>
<id>ecd60a56ebd6bdc347a486f53da7de0febef58cf</id>
<content type='text'>
When adding a conflict for some path, remove the staged entry.
Otherwise, an illegal index (with both stage 0 and high-stage
entries) would result.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When adding a conflict for some path, remove the staged entry.
Otherwise, an illegal index (with both stage 0 and high-stage
entries) would result.
</pre>
</div>
</content>
</entry>
<entry>
<title>index: make the entries have more accurate sizes</title>
<updated>2015-05-12T09:43:27+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2015-05-12T09:43:27+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=ca29427979b693714a78f01a8e3a754358584882'/>
<id>ca29427979b693714a78f01a8e3a754358584882</id>
<content type='text'>
While we are confident about the size of an int in architectures we're
likely to care about, the index format is defined by the exact size of
the fields. Use the definitions which show the exact width of the entry
fields.

As part of that, bring back 32-bit time and size fields, which currently
are 64 bits wide and can bring a false sense of security in how much
data they really store. Document that these fields are not to be taken
as authoritative.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While we are confident about the size of an int in architectures we're
likely to care about, the index format is defined by the exact size of
the fields. Use the definitions which show the exact width of the entry
fields.

As part of that, bring back 32-bit time and size fields, which currently
are 64 bits wide and can bring a false sense of security in how much
data they really store. Document that these fields are not to be taken
as authoritative.
</pre>
</div>
</content>
</entry>
</feed>
