From 01efbac5a3e3fd9256546c886593c4611595940a Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Fri, 6 Jul 2018 04:03:49 +0300 Subject: [PATCH] brancher: don't checkout if no branches is specified Signed-off-by: Ruslan Kuprieiev --- dvc/scm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dvc/scm.py b/dvc/scm.py index ecced4059..be1f533ca 100644 --- a/dvc/scm.py +++ b/dvc/scm.py @@ -45,6 +45,10 @@ class Base(object): pass def brancher(self, branches=None, all_branches=False): + if not branches and not all_branches: + yield '' + return + saved = self.active_branch() if not branches: branches = self.list_branches() if all_branches else [saved]