diff --git a/lib/tfw/components/snapshot_provider.py b/lib/tfw/components/snapshot_provider.py index 69aa33e..edee8ab 100644 --- a/lib/tfw/components/snapshot_provider.py +++ b/lib/tfw/components/snapshot_provider.py @@ -111,6 +111,12 @@ class SnapshotProvider: )) self._checkout(branch_name) + def _checkout(self, what): + self._run(( + 'git', 'checkout', + what + )) + def restore_snapshot(self, date): commit = self._get_commit_from_timestamp(date) self._checkout(commit) @@ -130,12 +136,6 @@ class SnapshotProvider: self.__last_valid_branch = self._branch return self.__last_valid_branch - def _checkout(self, what): - self._run(( - 'git', 'checkout', - what - )) - @property def all_timelines(self): return self._branches