Simplify use of getattr.
Add porcelain 'reset'.
Pass in commit during shallow clone, to avoid extra lookup.
Simplify shallows handling.
Simplify handling of shallows, without involving temporary grafts.
Merge milki's shallow branch support.