Jaseem Abid
jaseemabid@gmail.com
B090264CS
NIT Calicut
#include <git2.h> git_repository *repo; git_repository_open(&repo, "/path/to/repo.git"); /* do stuff with the repository */ git_repository_free(repo);
.gitignore .gitmodules README.md binding.gyp docs lib/index.js package.json src/TODO src/head.cc src/index.cc .... ....
l = require 'libnodegit' repo = new l.Repository "~/Projects/libnodegit" console.log repo.index()
✈ coffee examples/index.coffee [ { path: '.gitignore', sha: '47daa783f3d9663a938b48629121a997f2c80c61', size: 87, device: 2052, inode: 13238282, uid: 1000, gid: 100, ctime: 1349736253, mtime: 1349736253 }, { ... }, { ... }, { ... } ]
Familiarization with git, libgit2 and node.js
The v8 C++ API underneath node.js is complicated and need to be mastered. It also requires a good understanding of the C++ language, the git object store and the plumbing commands.
Open a repository with a given path, retrieve and update information like user
information, config variables, description, branches, tags, remotes, submodules etc
Git diff, blame, show file/blob contents
Retrieve state of the repository index (dirty/clean)
Information on files in the index, their hash, size, mime type etc
API to add, ignore, stage, unstage and reset files
API to view staged and unstaged data.
API for git branching
git branch, merge, checkout etc
Provide API for init, push, pull, clone etc.
History walking from standard reference points like branches, tags etc and more
advanced options like shortlog and log –oneline.
Git revert, reset, rebase, interactive rebase, reorder, squashing etc
git commit, amend etc
git gc, bundle, purne, fsck
Provide a callback based asynchronous API for huge performance improvements.
Instead of leaving it to the end as a big step, this will be implemented gradually as the project progress.