Fixes and improved debugging.
Merge conflict fixed
Switch Grit put_raw_object call to JGit in Publication#flatten_commits