Mercurial > hg > hg-git
changeset 709:4f0a154ae374
git_handler: return early when no commits need to be exported
This will make our life easier in an upcoming patch.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Fri, 14 Mar 2014 19:18:19 -0700 |
parents | d5facc1be5f8 |
children | 5c7943ca051f |
files | hggit/git_handler.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -356,8 +356,10 @@ nodes = [clnode(n) for n in self.repo] export = [node for node in nodes if not hex(node) in self._map_hg] total = len(export) - if total: - self.ui.note(_("exporting hg objects to git\n")) + if not total: + return + + self.ui.note(_("exporting hg objects to git\n")) # By only exporting deltas, the assertion is that all previous objects # for all other changesets are already present in the Git repository.