GITLAB patch: More stable raw commit parsing
Added a method count_all for faster counting. Added methods called tag_count, head_count and remote_count. These just count how many there are, without building the actual items. On big git repositories this makes a lot of difference.
Alias head_count to branch_count.
Merge pull request #1 from nathanvda/master

More efficient counting of tags/remotes/heads
travis file added
Gemfile added
Make sure that Ref does not create the commit when doing a `find_all`, but instead only looks for the commit when it is needed. Improves lookup time enormously.
Merge pull request #2 from nathanvda/master

further improving performance
Fix build on ci.
Merge pull request #4 from nathanvda/master

Fix the travis CI build.
Fixes symlinks omission from diff.
make object writes atomic

When Grit writes a loose object via the LooseStorage class,
it just opens the object file and starts writing. This works
most of the time, but can be a problem in some corner cases,
including:

  1. If another process tries to write the same object
     simultaneously, the writes may be interleaved and the
     object can be corrupted.

  2. If another process tries to read the object
     simultaneously, it may see the object in a half-written
     state.

  3. If the process or machine crashes during the write, we
     may leave a half-written corrupt object.

This can be solved by writing the object to a temporary file
and linking it into place. This is the same strategy used by
git itself.
fsync loose objects before moving into place

When we write a loose object to disk, we simply close the
file object before moving it into place. If the machine
crashes shortly after our write, the contents may not have
been committed to disk (depending your filesystem, usually
the metadata is, and you end up with a corrupt, zero-length
loose object file).

This is especially bad because we report that the object is
successfully written, which means we may have updated refs
to point to it. A corrupt object at that point means not
only does the operation fail, but the repository is left in
a corrupted and unusable state.

We can fix this by calling fsync on the object file before
linking it into place. Between this and the previous commit,
our object writing should now behave exactly like git's
internal routines.
Merge pull request #157 from github/atomic-object-writes

Atomic object writes
Fix Tempfile usage under ruby 1.8.7

There's no third argument to Tempfile#open under 1.8.7. The default
mode is w+ which should be fine and there's no encoding support so
the binary flag doesn't matter.
use method_defined? instead of hardcoded version string to support both ruby 1.9 and 2.0.
explicitly set ASCII_8BIT encoding in PACK_IDX_SIGNATURE.

otherwise "..."'s encoding is UTF-8 in ruby 2.0.
Merge pull request #9 from fdiary/ruby-2.0

support ruby 2.0
Merge pull request #7 from kouno/fix-symlinks

Fixes symlinks omission from diff.
Add ruby 2.0.0 to travis