<?xml version="1.0" encoding="UTF-8"?>
<commits type="array">
  <commit>
    <parents type="array">
      <parent>
        <id>bf4f0ef840fc8f6f283b62ee167d6211edb575e6</id>
      </parent>
    </parents>
    <author>
      <name>rentzsch</name>
      <email>jwr.git@redshed.net</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/fff7b28027f485df1842310b6bb4db70723b2d42</url>
    <id>fff7b28027f485df1842310b6bb4db70723b2d42</id>
    <committed-date>2009-07-20T03:40:49-07:00</committed-date>
    <authored-date>2009-07-16T17:25:47-07:00</authored-date>
    <message>[DEV] Make GITRepo+Enumerators.h a public header.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>721d809ad1d46be437c958cf1c2be7b803ad3556</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>7fb78de88518e180672a895698591d26cb5f7ad6</id>
      </parent>
    </parents>
    <author>
      <name>rentzsch</name>
      <email>jwr.git@redshed.net</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/bf4f0ef840fc8f6f283b62ee167d6211edb575e6</url>
    <id>bf4f0ef840fc8f6f283b62ee167d6211edb575e6</id>
    <committed-date>2009-07-20T03:40:48-07:00</committed-date>
    <authored-date>2009-07-16T13:19:19-07:00</authored-date>
    <message>[NEW] Add -[GITDateTime compare:] for commit-time sortablity.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>c7456667f1b8d3388d1efb78a9d60a9d0f3a8671</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>5f139e017b418e7e45804f85672c121dc17fd8eb</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/7fb78de88518e180672a895698591d26cb5f7ad6</url>
    <id>7fb78de88518e180672a895698591d26cb5f7ad6</id>
    <committed-date>2009-06-17T05:43:43-07:00</committed-date>
    <authored-date>2009-04-30T13:44:22-07:00</authored-date>
    <message>Refactor packSHA1 routine to use a lookup table instead of strchr()

Also, since this method now operates directly on bytes, create a new
method 'packSHA1FromBytes' and call it from 'packSHA1FromString' passing
a pointer to the bytes in the string.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>ebf7f53926e3a756cd4e1d9d1458167c6dee9c5b</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>c45fb8296758c589d436ab94d098725f7f3c3273</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/5f139e017b418e7e45804f85672c121dc17fd8eb</url>
    <id>5f139e017b418e7e45804f85672c121dc17fd8eb</id>
    <committed-date>2009-06-17T05:43:41-07:00</committed-date>
    <authored-date>2009-04-30T13:45:58-07:00</authored-date>
    <message>Added testcase for packSHA1FromBytes

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>fa2119e9acc5d04707a5de8ce02d129640ebc118</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>9940ed58a9d3b96f3cc8745d38990fca3a14f863</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/c45fb8296758c589d436ab94d098725f7f3c3273</url>
    <id>c45fb8296758c589d436ab94d098725f7f3c3273</id>
    <committed-date>2009-06-17T05:43:39-07:00</committed-date>
    <authored-date>2009-04-23T15:52:36-07:00</authored-date>
    <message>Refactor GITPackReverseIndex to be simpler and faster.

Remove the slow, convoluted reverse index creation scheme and replace it with
a CFArray of struct pointers that store the offset and the index of the entry
in the pack index. This is similar to the git implementation, except we use a
CFArray instead of a straight C solution. Note that we need to use a CFArray
instead of NSArray because we want to store pointers to structs, not objects.
NSArray can only store objects.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>8555160ff4c721788adbe977751bd584ddcadbc5</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>475ae99c0281eb4f21933fe11c93f6b07b70e2a3</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/9940ed58a9d3b96f3cc8745d38990fca3a14f863</url>
    <id>9940ed58a9d3b96f3cc8745d38990fca3a14f863</id>
    <committed-date>2009-06-17T05:43:38-07:00</committed-date>
    <authored-date>2009-04-30T13:32:24-07:00</authored-date>
    <message>optimization[2/2]: only parse essential commit info upon initialization

Minimal information needed to traverse the graph:
+ commit-id (sha1) to uniquely identify the commit.
+ tree-id (sha1) to access the tree and object-ids associated with the commit.
+ list of parent-id (sha1)s. + raw committer date, ignoring the timezone.

For better efficiency, we extract only what we need, and cache the rest
in an NSData object for later extraction.
Lazily fetched properties are:
author + authored + committer + committed + message

Currently lazy-fetching is as simple as possible, a call to any of the above
methods will cause all of the cached data to be parsed, filling in the rest of
the data.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>b1de83a44551db0d8ca3bc7655210a4070d99f5f</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>fbbd05f0609203f2cfa9defcdda8db507f6a1d53</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/475ae99c0281eb4f21933fe11c93f6b07b70e2a3</url>
    <id>475ae99c0281eb4f21933fe11c93f6b07b70e2a3</id>
    <committed-date>2009-06-17T05:43:36-07:00</committed-date>
    <authored-date>2009-04-30T13:35:29-07:00</authored-date>
    <message>Initialize a GITActor from partially processed object header data

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>c794625d52f6809430a19282847daa8aef1abcfe</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>5c0ba8c0a748ad0d4255156e9674297a4dccf156</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/fbbd05f0609203f2cfa9defcdda8db507f6a1d53</url>
    <id>fbbd05f0609203f2cfa9defcdda8db507f6a1d53</id>
    <committed-date>2009-06-17T05:43:33-07:00</committed-date>
    <authored-date>2009-04-30T13:39:51-07:00</authored-date>
    <message>Add GITDateTime initializaer that accepts a BSD date and (int)timezone offset

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>13d0eb4571e2f531d03e96810e2f3c5144707d2b</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>80c98eb0eed1df3dcb34fcb3738c14ee3473320d</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/5c0ba8c0a748ad0d4255156e9674297a4dccf156</url>
    <id>5c0ba8c0a748ad0d4255156e9674297a4dccf156</id>
    <committed-date>2009-06-17T05:43:32-07:00</committed-date>
    <authored-date>2009-04-29T23:16:59-07:00</authored-date>
    <message>optimization[1/2]: faster routines for extracting data from core objects

When walking the commit graph, parsing essential information from commits can
be a potential bottleneck. This is not a big deal for small repositories, or
in cases where the entire graph not traversed. However, for large repos such
as git or the linux kernel, traversing the graph starting from HEAD takes
several seconds. Shark profiling shows that the NSScanner-based
GITCommit#parseRawData routine is slow, taking the same or more time than
(zlib) inflate. In constrast, zlib inflate is the major limiting step in
git-rev-list.

This change-set introduces some custom parsing code in an attempt to make this
go as fast as possible. The general approach is outlined below, with step 1
implemented in this change-set.

1. Remove NSScanner and drop straight down to raw C.
The slow steps seemed to be loading the scanner and allocating NSStrings. We
now access raw bytes directly and do not create an NSString unless we need it.
To drive the 'parser', define an objectRecord struct for each line or
substring that needs to be extracted. In some cases (i.e. sha1 strings) we
know the length, so specifying it explicitly saves some scanning. This code is
mostly used through a single-method Objective-C interface defined in a
&quot;Parsing&quot; category on GITObject.

2. Do _not_ parse the entire commit when the object is created.
Minimal nformation needed to traverse the graph:
+ commit-id (sha1) to uniquely identify the commit.
+ tree-id (sha1) to access the tree and object-ids associated with the commit.
+ list of parent-id (sha1)s.
+ raw committer date, ignoring the timezone.

Thus, for better efficiency, we extract only what we need, and cache the rest
in an NSData object for later extraction. This means that properties are now
fetched lazily:
+ author
+ authored
+ committer
+ committed
+ message

Currently lazy-fetching is as simple as possible, a call to any of the above
methods will cause all of the cached data to be parsed, filling in the rest of
the properties and releasing the cached data. This is simple to implement, and
the rationale is that long lists of commits/objects are likely to be needed
quickly during network transfer or pack file creation. If the information
associated with a commit is required, it is likely being displayed on demand
for a user who will not need to look at 18000 commits at once.

To summarize, it boils down to:
Extract structural information required for building a graph as fast as
possible. Fill in the rest when it is needed.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>08f347cc9537f313b3e64091ddd88ec280a86671</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>073acf6721b8f747389f22d64dd6a4b6768734a0</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/80c98eb0eed1df3dcb34fcb3738c14ee3473320d</url>
    <id>80c98eb0eed1df3dcb34fcb3738c14ee3473320d</id>
    <committed-date>2009-06-17T05:43:29-07:00</committed-date>
    <authored-date>2009-04-30T22:18:05-07:00</authored-date>
    <message>update xcode project

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>3338906a67537d570eb82cba286129733b528a3f</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>f4c80f2cec1f2248feb8404ede55ae3cd6a436c8</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/073acf6721b8f747389f22d64dd6a4b6768734a0</url>
    <id>073acf6721b8f747389f22d64dd6a4b6768734a0</id>
    <committed-date>2009-06-17T05:43:27-07:00</committed-date>
    <authored-date>2009-04-30T20:36:39-07:00</authored-date>
    <message>Update test repo with new branches for testing revision walking and sorting.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>481e4f0571ab0e313ce8e9263546a9b2b93d1d5e</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>9b8861ecfbbdb1779fec4ec92ef5e56d8d6e29c6</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/f4c80f2cec1f2248feb8404ede55ae3cd6a436c8</url>
    <id>f4c80f2cec1f2248feb8404ede55ae3cd6a436c8</id>
    <committed-date>2009-06-17T05:43:23-07:00</committed-date>
    <authored-date>2009-04-30T21:52:04-07:00</authored-date>
    <message>Add fixture generator and .plist file for GITGraph sort order tests

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>510c48430647a2f7e672e5268d82d3f309800c42</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>e6ad9f14b76b0f073355c970d734975c929ab208</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/9b8861ecfbbdb1779fec4ec92ef5e56d8d6e29c6</url>
    <id>9b8861ecfbbdb1779fec4ec92ef5e56d8d6e29c6</id>
    <committed-date>2009-06-17T05:43:20-07:00</committed-date>
    <authored-date>2009-04-30T20:40:10-07:00</authored-date>
    <message>Update count of branches in GITRepo test

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>12a95e547c55a2032007acb04f9ab7c87d2a2131</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>e8b62cca0574299d47f32a46c5014af17290a758</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/e6ad9f14b76b0f073355c970d734975c929ab208</url>
    <id>e6ad9f14b76b0f073355c970d734975c929ab208</id>
    <committed-date>2009-06-17T05:43:18-07:00</committed-date>
    <authored-date>2009-04-30T20:37:45-07:00</authored-date>
    <message>Add tests for GITGraph sort methods.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>a52e2db8e13aeaa14edcbe2e8c66af09d1b4fda5</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>0706a1358153eae8ffeafaca548d050dc32bae22</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/e8b62cca0574299d47f32a46c5014af17290a758</url>
    <id>e8b62cca0574299d47f32a46c5014af17290a758</id>
    <committed-date>2009-06-17T05:43:16-07:00</committed-date>
    <authored-date>2009-04-30T22:06:14-07:00</authored-date>
    <message>git-rev-list CLI tool: uses API to reproduce output from 'git rev-list'

The tool currently supports output identical[1] to the following commands:

git rev-list &lt;commit-id&gt;
git rev-list --date-order &lt;commit-id&gt;
git rev-list --topo-order &lt;commit-id&gt;

Note that listing multiple commits, ranges or excluding commits is not
supported, but branch heads can be specified in place of &lt;commit-id&gt;. See use
for more info.

This tool is exceptionally useful for profiling and comparison with the real
git-rev-list. It plays well with Shark and Instruments as long as you setup
the command arguments properly (hint: see the &quot;Executables&quot; grouping in
Xcode). The '-r' flag allows you to specify any repo, so you can clone out the
linux kernel and use that for testing, ect..

[1] This is based on my testing with the git repository, comparing output
using HEAD as the commit with the options specified above. This was actually a
PITA to sort out, especially since --date-order is almost always identical to
the default ordering, except in some rare cases. The test repo now contains a
small version of a branch with enough strange date-madness edge-cases that
will produce a unique sort ordering in each case. This should be useful for
further development of these routines.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>dab9805965a815ccdbde0d23ab1510e619555b48</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>ba4c0eb86e0982c95d617802101b7c3a4d26d208</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/0706a1358153eae8ffeafaca548d050dc32bae22</url>
    <id>0706a1358153eae8ffeafaca548d050dc32bae22</id>
    <committed-date>2009-06-17T05:43:13-07:00</committed-date>
    <authored-date>2009-04-30T22:34:24-07:00</authored-date>
    <message>Original Nu prototype for graph structure and topological sort

rev-list.nu
This is superseded by the 'git-rev-list' cli tool, but spared from death for
educational value + links to some useful references.

set-diff.nu
Simple brute force tool to test whether sets of lines from 2 files identical.
I was a bit lost when I first started trying to sort out graph traversal and
topological ordering. This helped compare output from the real git-rev-list to
my incorrect output to at least make sure that I wasn't doing something really
stupid. Since we're comparing sets, we don't care about order, only unique content.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>33a8da3ac20f9b2b8810d191c4c796d60566716b</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>0745dc596e70518713f7468b745fddbb5643bed4</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/ba4c0eb86e0982c95d617802101b7c3a4d26d208</url>
    <id>ba4c0eb86e0982c95d617802101b7c3a4d26d208</id>
    <committed-date>2009-06-17T05:43:11-07:00</committed-date>
    <authored-date>2009-04-30T22:15:40-07:00</authored-date>
    <message>Enumerator subclasses for BFS/DFS traversal of GITCommit objects in a repo.

This also includes a GITRepo category that defines the enumerator factor methods.

These are currently not used by the graph class, but they will likely be used eventually for some a few revision-walking tasks. Stay tuned.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>d63dde64942eb233a5d8b87071a99f2097e87570</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>097e9a3fd23ffff36a0579d445c65c16f71d6577</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/0745dc596e70518713f7468b745fddbb5643bed4</url>
    <id>0745dc596e70518713f7468b745fddbb5643bed4</id>
    <committed-date>2009-06-17T05:43:10-07:00</committed-date>
    <authored-date>2009-04-30T21:43:33-07:00</authored-date>
    <message>Add GITNode class to represent a GITObject in a graph.

A GITNode is a simple wrapper class that store a pointer to a GITObject and
also caches/stores information related to the graph structure. A GITObject
(currently a GITCommit) is required to create a node, since the nodes key is
derived from the object's sha1. This key is used to uniquely identify the node
in a graph.

The idea behind separating the actual objects from the graph representation
is:

1. convenience of not added extra properties to GITObject/GITCommit
2. encapsulation of graph storage/traversal algorithms
3. possibility to create thread-safe graph structure for multi-threaded
processing.

Once constructed, we can still do traversals and sorting operations without
the objects. They could be released to save space. In addition, this also
makes it possible to create a minimal copy of the graph for multi-threaded
operations, should the need arise. On the other hand, it may turn out that the
overhead of creating extra objects is a bad idea.

I'm also aware that this is a fairly naive way to handle a graph. There are
almost certainly better/more efficient ways of storing and accessing the same
information. This seems to work for now, but is subject to change should the
need arise.

Rough estimate of memory overhead for a graph of the git repository starting
from HEAD, containing ~18400 commits:

graph + nodes (with objects) = 23 MB
graph + nodes (objects released) = 8 MB

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>ea320116d588e95d097354dede8f3219ec294f4a</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>d0d16b13d2d31e02afab18ae1ac8259f6010cbd5</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/097e9a3fd23ffff36a0579d445c65c16f71d6577</url>
    <id>097e9a3fd23ffff36a0579d445c65c16f71d6577</id>
    <committed-date>2009-06-17T05:43:07-07:00</committed-date>
    <authored-date>2009-04-30T20:39:25-07:00</authored-date>
    <message>Add helper methods to GITRepo for retrieving commits associated with branch heads

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>0919ba5b8fccbb5e350018bbca3bc0df92550f4d</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>ab2e783fa442cd73221741ac43338ace3f050a6f</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/d0d16b13d2d31e02afab18ae1ac8259f6010cbd5</url>
    <id>d0d16b13d2d31e02afab18ae1ac8259f6010cbd5</id>
    <committed-date>2009-06-17T05:43:06-07:00</committed-date>
    <authored-date>2009-04-30T20:24:44-07:00</authored-date>
    <message>Simple GITGraph class to represent a directed acyclic graph (DAG)

The graph class is a wrapper around an NSMutableDictionary of node objects.
Each dictionary entry consists of a sha1 key (40-char NSString) and a
GITObjectNode value that wraps the corresponding GITObject (GITCommit for
now). Because of this arrangement, the graph acts like a standard Foundation
collection in the sense that it retains objects that are added, and released
objects upon removal.

In addition to methods for adding/removing and querying nodes, the graph also
supports specialized sort methods that return NSArrays of nodes sorted by date
or topology. These lists are identical to the lists of objects obtained from
git-rev-list with the default, --topo-order or --date-order flags.

The interface currently lacks much documentation, but is relatively
straightforward. For use examples, see the unit tests or the source
'git-rev-list' tool.

NOTES
-----
Each of the 'sort' utilities requires the entire graph to be built and
held in memory prior to sorting. I think this is required for the topological
sort, but not for the date-based sort. I think it should be possible to
abstract out some of the functionality into enumerators or generators that can
spit out objects on demand, without requiring as much overhead.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>1d2b23f9f781d7db652728c680292c51cdf179a3</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>98178c0a410a19b86c9339b8c5d8eac8ffd717ad</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/ab2e783fa442cd73221741ac43338ace3f050a6f</url>
    <id>ab2e783fa442cd73221741ac43338ace3f050a6f</id>
    <committed-date>2009-06-17T05:43:04-07:00</committed-date>
    <authored-date>2009-04-25T11:41:49-07:00</authored-date>
    <message>Fix leaking GITCommit#parentShas.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>5a6fa69ce0ff63a6f491d7f6b1536d254a942e3b</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>981b4021248ac9c3b42c291721cf7611c100b0b2</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/98178c0a410a19b86c9339b8c5d8eac8ffd717ad</url>
    <id>98178c0a410a19b86c9339b8c5d8eac8ffd717ad</id>
    <committed-date>2009-06-17T05:43:02-07:00</committed-date>
    <authored-date>2009-04-23T16:39:15-07:00</authored-date>
    <message>Fix refStore memleak in GITRepo.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>aaa986a1f1988c413b518056f76324ca2b321711</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>84af0e465440b50a040eaf86aaff6f358c9c12a8</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/981b4021248ac9c3b42c291721cf7611c100b0b2</url>
    <id>981b4021248ac9c3b42c291721cf7611c100b0b2</id>
    <committed-date>2009-06-17T05:43:01-07:00</committed-date>
    <authored-date>2009-04-23T16:40:15-07:00</authored-date>
    <message>Fix memleak in symbolic-ref handling.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>ca708c457949d29bc0942f4ee9841537b6fca055</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>cdfdb2a8679e9d1eeaab90d3028fe20ec4886dbc</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/84af0e465440b50a040eaf86aaff6f358c9c12a8</url>
    <id>84af0e465440b50a040eaf86aaff6f358c9c12a8</id>
    <committed-date>2009-06-17T05:42:59-07:00</committed-date>
    <authored-date>2009-04-18T16:48:06-07:00</authored-date>
    <message>testing ways to optimize GITCommit#parseRawData:

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>a83012758d1577042fe0afa51717a05b4b4da8fb</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>6c37c491727fc96d1d7e20ac01a3929959a6d87f</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/cdfdb2a8679e9d1eeaab90d3028fe20ec4886dbc</url>
    <id>cdfdb2a8679e9d1eeaab90d3028fe20ec4886dbc</id>
    <committed-date>2009-06-17T05:42:57-07:00</committed-date>
    <authored-date>2009-04-16T22:01:53-07:00</authored-date>
    <message>Use NSArray for GITCommit#parents to preverse the order of parents of a commit object.

In order to consistantly produce the same topological ordering of a
graph of commit objects, the order of the parent objects must be preserved.
If the parent order is not preservedr, then commits with muliple parents will
result in an arbitrarily chosen topological sort.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>ef9b661b526b129d6862fdb0d4604b55fd26c122</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>352a2d9addef621e2ab46919c3f839240af732ad</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/6c37c491727fc96d1d7e20ac01a3929959a6d87f</url>
    <id>6c37c491727fc96d1d7e20ac01a3929959a6d87f</id>
    <committed-date>2009-06-17T05:42:52-07:00</committed-date>
    <authored-date>2009-04-16T21:37:27-07:00</authored-date>
    <message>GITObject#hash calls [[self sha1] hash] to match GITObject#isEqual:

The previous implementation was creating an NSScanner to scan [self sha1].
This turned out to be a _massive_ bottleneck during preliminary testing of
revision walking routines that iterate over a large set of commit objects.
Calling [[self sha1] hash] here is faster by at least an order of magnitude.

Signed-off-by: Geoff Garside &lt;geoff@geoffgarside.co.uk&gt;</message>
    <tree>9541ca1c9b3cb6b31a368bfee166853880671594</tree>
    <committer>
      <name>Geoff Garside</name>
      <email>geoff@geoffgarside.co.uk</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>466f0a1ceee4a97a63eb4ea86d6e3fb640a45da7</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/352a2d9addef621e2ab46919c3f839240af732ad</url>
    <id>352a2d9addef621e2ab46919c3f839240af732ad</id>
    <committed-date>2009-04-15T12:18:19-07:00</committed-date>
    <authored-date>2009-04-15T00:52:15-07:00</authored-date>
    <message>Refactor index lookup methods to use a binary search algorithm for sha1 lookups.

Start cleaning up the interface by adding -indexOfSha1: method that
finds the index of a sha1 in the sha1(v2) or offset+sha1(v1) table
and either returns the index or NSNotFound.  This is the same concept
as NSArray#indexOfObject: The main difference is that right now
indexOfSha1: is intended to be a private method, since other classes
should not really care about the 'index' in the table.

I think index lookups should be handled as follows:

Internal methods that require an index as a parameter should throw
an exception if the index is out of bounds, since it should never
be passed an illegal index unless there is a programming error.

The public methods for accessing properties associated with a sha1
(i.e. offset, CRC) just check for an NSNotFound and bail (optionally with an error).
Otherwise, the lookup succeeds.  If somehow -indexOfSha1: returns
a value outside of the index range, something bad has happened, and having
the exception will help track down the bug.</message>
    <tree>ed920247fef270cd53e6d4db4dd8e8c3f2a0b94d</tree>
    <committer>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>ec75fc7cfce9bc688e450d63873001c1cc9e9019</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/466f0a1ceee4a97a63eb4ea86d6e3fb640a45da7</url>
    <id>466f0a1ceee4a97a63eb4ea86d6e3fb640a45da7</id>
    <committed-date>2009-04-14T01:47:44-07:00</committed-date>
    <authored-date>2009-04-14T01:21:48-07:00</authored-date>
    <message>Add test cases and assertions for version 1 pack index files.

NOTE: The actual pack file is the same.  The only thing that has changed
is that the .v1.idx file is a version 1 index for the pack file.  The tests
make sure that we get the same objects/sha1/offsets from both versions.</message>
    <tree>d751304453f646a61dc6230c94d74f68aa3854b7</tree>
    <committer>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>933056be6dc18561b0d379581452406e811cb9a0</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/ec75fc7cfce9bc688e450d63873001c1cc9e9019</url>
    <id>ec75fc7cfce9bc688e450d63873001c1cc9e9019</id>
    <committed-date>2009-04-14T01:47:44-07:00</committed-date>
    <authored-date>2009-04-13T22:13:16-07:00</authored-date>
    <message>Add sha1/offset lookup &amp; GITPackReverseIndex support to GITPackIndexVersion1

This changeset provides Pack Index V1 implementations of:
- (packIndexEntry *) packEntryWithIndex:(NSUInteger)i;
- (off_t) packOffsetWithIndex:(NSUInteger)i;
- (NSData *)packedSha1WithIndex:(NSUInteger)i;

packOffsetWithIndex is used to build the reverse index, which
provides:
- (off_t)baseOffsetWithOffset:(off_t)offset;
- (off_t)nextOffsetWithOffset:(off_t)offset;
- (NSString *)sha1WithOffset:(off_t)offset;</message>
    <tree>fb2ea5e183d8433a899adc75daa1a8f80771f6ee</tree>
    <committer>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </committer>
  </commit>
  <commit>
    <parents type="array">
      <parent>
        <id>e37c9f497303dfecee69e769c2e8dbade5256ab5</id>
      </parent>
    </parents>
    <author>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </author>
    <url>http://github.com/geoffgarside/cocoagit/commit/933056be6dc18561b0d379581452406e811cb9a0</url>
    <id>933056be6dc18561b0d379581452406e811cb9a0</id>
    <committed-date>2009-04-14T01:47:28-07:00</committed-date>
    <authored-date>2009-04-13T22:06:31-07:00</authored-date>
    <message>only import GITPackReverseIndex in source file</message>
    <tree>4e3e5ea0a30541bfeca4aae6b31e7e9ef3562b67</tree>
    <committer>
      <name>Brian Chapados</name>
      <email>chapados@sciencegeeks.org</email>
    </committer>
  </commit>
</commits>
