libgit2/rugged — pull request #246 by nvloff (2013-08-01 10:20:56+00:00)
Title: WIP Submodules

:warning: DO NOT MERGE :warning:

I started with the submodules. This may take a while...

A couple of notes:
* I really like the `status_name?` methods. I am very bad at typing and to guard myself from typos i wanted to extract all the ruby visible status names in one place and i got the following ugliness. On a sidenote: I benchmarked this `rb_intern` caching and it does't make any noticeable difference.
```c
rb_ary_push(status_list,
id_in_head = CSTR2SYM("in_head")
);
```

* The status names are inspired by `objective-git`. The wording may be wrong on some of them. Ideas are welcome!
* I copied the fixtures, some tests and setup methods from libgit2

Things:
- [x] submodule.lookup
- [x] submodule.status
- [ ] fancy status checks - GIT_SUBMODULE_STATUS_IS_UNMODIFIED, ...
- [ ] refactor `rewrite_submodules` - it's almost direct c -> ruby translation currently. can be better!
- [ ] docs
- [ ] rest of the submodule API

I'll update the task list as I go. I'm not really sure how will the submodule API end up looking.