libgit2/pygit2 — pull request #86 by cholin (2012-05-11 10:09:12+00:00)
Title: create_blob-Method for blob creation out of memory

As far as I'm not missing something it's not possible at the moment to create a blob out of memory without the use of index. If you want to commit a new blob for a bare repository this is a problem. Following pull request adds a ```create_blob``` for Repository.

Example
```
import time
from pygit2 import init_repository, Signature

# create a new bare repository
repo = init_repository("testrepo", True)

# create a tree with blob out of memory
blob_oid = repo.create_blob("bar")
builder = repo.TreeBuilder()
builder.insert('foo.txt', blob_oid, 0100644)
tree_oid = builder.write()

author = committer = Signature('foo bar', 'foo@bar.de', 120, int(time.time()))

# commit everything (as initial commit)
repo.create_commit(
'HEAD',
author,
committer,
'initial commit',
tree_oid,
[]
)
```