Skip to content

Commit

Permalink
Merge pull request #3211 from skshetry/fix-brancher-noscm
Browse files Browse the repository at this point in the history
brancher: do not get tree if there's no revs
  • Loading branch information
efiop authored Jan 22, 2020
2 parents d2d887b + 5f8b1f7 commit b99c5e4
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 b99c5e4

Please sign in to comment.