def _selected_commits_changed(self, new): if new: if len(new) == 1: self.selected_lhs = new[0] self.selected_rhs = get_head_commit(self.repo) elif len(new) == 2: a, b = new self.selected_rhs = a if b == self.selected_lhs else b
def get_head_object(self): return get_head_commit(self._repo)