Minor typo fix: “buy” → “by”.
Merge pull request #111 from pda/patch-2

Minor typo fix in documentation: “buy” → “by”.
Fix an edge case in rev_parse.

Make sure we don't split on a `ref:path' revision.
Merge pull request #140 from sbryant/fix_rev_parse

Fix an edge case in rev_parse.
Fixes symlinks omission from diff.
Correct spelling of "represent"
Merge pull request #149 from shepmaster/patch-1

Correct spelling of "represent"
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
update mocha to support tests on ruby 2.0.
Merge pull request #10 from fdiary/mocha-0.13.2

update mocha to support tests on ruby 2.0.
build a separate gem for gitlab grit
Minor typo fix: “buy” → “by”.