diff --git a/dvc/graph/commit.py b/dvc/graph/commit.py index 19fe7ac46..d34c7c913 100644 --- a/dvc/graph/commit.py +++ b/dvc/graph/commit.py @@ -38,7 +38,7 @@ class Commit(object): self._collapsed_commits.append(commit) self._collapsed_commits += commit._collapsed_commits - def text(self, max_commits=None): + def text(self, max_commits=100): branch_text = '' if self._branch_tips: branch_text = 'BRANCH TIPS: {}\n'.format(', '.join(self._branch_tips)) @@ -60,7 +60,7 @@ class Commit(object): else: return comment[:Commit.TEXT_LIMIT-3] + '...' - def _comments_text(self, max_commits): + def _comments_text(self, max_commits=100): res = [] if not self.is_repro: res.append(self._text_comment(self)) @@ -72,10 +72,8 @@ class Commit(object): if len(res) == 0: return self._text_comment(self) - was_collapsed = False - if max_commits: - was_collapsed = len(res) > max_commits - res = res[:max_commits] + was_collapsed = len(res) > max_commits + res = res[:max_commits] max_len = max(map(lambda x: len(x), res)) res_extended_len = map(lambda x: x.ljust(max_len), res)