From 005a6016aa07fc06151e765451dd636791ced909 Mon Sep 17 00:00:00 2001 From: pawel Date: Mon, 17 Jun 2019 22:41:15 +0200 Subject: [PATCH] brancher refactor --- dvc/repo/brancher.py | 4 ++-- dvc/repo/metrics/show.py | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dvc/repo/brancher.py b/dvc/repo/brancher.py index e84fcaf70..be1dacf1c 100644 --- a/dvc/repo/brancher.py +++ b/dvc/repo/brancher.py @@ -36,9 +36,9 @@ def brancher( # noqa: E302 if all_tags: tags = scm.list_tags() - if branches is None: + if branches is None and not (all_tags and not all_branches): revs.extend([scm.active_branch()]) - else: + elif branches is not None: revs.extend(branches) if tags is not None: diff --git a/dvc/repo/metrics/show.py b/dvc/repo/metrics/show.py index ef953a996..6ce9f8e71 100644 --- a/dvc/repo/metrics/show.py +++ b/dvc/repo/metrics/show.py @@ -269,9 +269,6 @@ def show( if metrics: res[branch] = metrics - if all_tags and not all_branches: - res.pop(repo.scm.active_branch()) - if not res: if path: raise BadMetricError(path)