GitSharp/v0.2.0

From eqqon

(Difference between revisions)
Jump to: navigation, search
Henon (Talk | contribs)
(gitsharp 0.2 release information)
Newer edit →

Revision as of 20:22, 28 October 2009

Downloads

Release Message

Dear fellow git enthusiasts, We are proud to announce version 0.2 which marks significant improvements in the new Git api we are building around GitSharp.Core. The core is a line-by-line port of jgit. Even though the porting is complete, we found it quite hard to use it without good knowledge of git's internals and technical concepts. The api which is documented by examples at http://www.eqqon.com/index.php/GitSharp/Examples encapsulates and abstracts this knowledge so that everyone with a little git experience could easily make use of the library.

The improvements mentioned above allow to add files to the index and commit them. It is as easy as this:

var repo = Repository.Init("path/to/new/repo");
// now suppose you have created some files in the new repository
repo.Index.Add("README", "License.txt");
var commit=repo.Commit("Initial commit, adding readme and license", new Author("henon", "meinrad.recheis@gmail.com"));

Easy, isn't it? Now let's have a look at the changes of this commit:

foreach(var change in commit.Changes) Console.WriteLine(change.Name + " " + change.ChangeType);

Of course there is still much work to do until this new API will completely reflect the full range of git interactions a standard application is probably going to need we hope to quickly build up the most important parts until the end of the year. If you check it out, please give us feedback which will be greatly appreciated.

Have a nice day,
--Henon 21:22, 28 October 2009 (CET)

Changes

New API Features
  • Repostiory.Index ... the index
  • Index.Add ... add files and directories (recursively). Ignore rules are in the works but not yet honored
  • Repository.Commit ... commit added files from the index
  • Commit.Changes ... list the changes of this commit to its parent commit(s)
  • Repository.Status ... summary of differences between the HEAD and the index
  • Repository.Config ... repository configuration access (yet lacks user and global configuration)
  • Blob.Create ... creates a new blob object from the given data or file and writes it to the repository
  • Blob.RawData ... raw access to a blob's binary data without bothering encoding
Fixed Core Issues
  • fixed another index bug that made add corrupt the index