This function will update the 'model' (lastCommit, amendingCommits) only when the repository sees the last commit change. 'render' can be called at any time, so be sure we don't update any 'model' fields until we actually start the transition.
Commits are equal if the ids are equal or if both are undefined. (If a commit is undefined, it represents the initial empty state of a repository, before the initial commit).
a hint on how to animate an update, set by certain user action handlers and used when updating the view based on a repository change