Skip to content

Commit

Permalink
brancher: do not get tree if there's no revs
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Jan 22, 2020
1 parent d942542 commit 5f8b1f7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dvc/repo/brancher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5f8b1f7

Please sign in to comment.