From 5f8b1f7f806706e18699ee6f2509e70a592ea664 Mon Sep 17 00:00:00 2001 From: Saugat Pachhai Date: Wed, 22 Jan 2020 17:22:54 +0545 Subject: [PATCH] brancher: do not get tree if there's no revs --- dvc/repo/brancher.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dvc/repo/brancher.py b/dvc/repo/brancher.py index f64bf41b7e..955b135135 100644 --- a/dvc/repo/brancher.py +++ b/dvc/repo/brancher.py @@ -42,8 +42,9 @@ def brancher( # noqa: E302 revs.extend(scm.list_tags()) try: - for sha, names in group_by(scm.resolve_rev, revs).items(): - self.tree = scm.get_tree(sha) - yield ", ".join(names) + if revs: + for sha, names in group_by(scm.resolve_rev, revs).items(): + self.tree = scm.get_tree(sha) + yield ", ".join(names) finally: self.tree = saved_tree