@@ -19,18 +19,17 @@ def __init__(self):
1919 self .drawnCommits = {}
2020 self .drawnRefs = {}
2121 self .drawnCommitIds = {}
22- self .zoomOuts = 0
2322 self .toFadeOut = m .Group ()
24- self .trimmed = False
2523 self .prevRef = None
2624 self .topref = None
2725 self .n_default = settings .n_default
2826 self .n = settings .n
2927 self .n_orig = self .n
3028 self .selected_branches = []
31- self .stop = False
3229 self .zone_title_offset = 2.6 if platform .system () == "Windows" else 2.6
3330 self .arrow_map = []
31+ self .all = settings .all
32+ self .first_parse = True
3433
3534 self .logo = m .ImageMobject (settings .logo )
3635 self .logo .width = 3
@@ -97,6 +96,7 @@ def parse_commits(
9796 if i == 0 and len (self .drawnRefs ) < 2 :
9897 self .draw_dark_ref ()
9998
99+ self .first_parse = False
100100 if i < self .n :
101101 i += 1
102102 commitParents = list (commit .parents )
@@ -110,6 +110,11 @@ def parse_commits(
110110 for p in range (len (commitParents )):
111111 self .parse_commits (commitParents [p ], i , circle )
112112
113+ def parse_all (self ):
114+ if self .all :
115+ for branch in self .get_nonparent_branch_names ():
116+ self .parse_commits (self .get_commit (branch .name ))
117+
113118 def show_intro (self ):
114119 if settings .animate and settings .show_intro :
115120 self .add (self .logo )
@@ -195,7 +200,7 @@ def draw_commit(self, commit, i, prevCircle, shift=numpy.array([0.0, 0.0, 0.0]))
195200 )
196201
197202 while any ((circle .get_center () == c ).all () for c in self .get_centers ()):
198- circle .next_to ( circle , m .DOWN , buff = 3.5 )
203+ circle .shift ( m .DOWN * 4 )
199204
200205 isNewCommit = commit .hexsha not in self .drawnCommits
201206
@@ -324,7 +329,7 @@ def draw_head(self, commit, i, commitId):
324329 self .drawnRefs ["HEAD" ] = head
325330 self .prevRef = head
326331
327- if i == 0 :
332+ if i == 0 and self . first_parse :
328333 self .topref = self .prevRef
329334
330335 def draw_branch (self , commit , i ):
@@ -340,8 +345,6 @@ def draw_branch(self, commit, i):
340345 branches .insert (0 , branches .pop (branches .index (selected_branch )))
341346
342347 for branch in branches :
343- # Use forward slash to check if branch is local or remote tracking
344- # and draw the branch label if its hexsha matches the current commit
345348 if (
346349 not self .is_remote_tracking_branch (branch ) # local branch
347350 and commit .hexsha == self .repo .heads [branch ].commit .hexsha
@@ -375,7 +378,7 @@ def draw_branch(self, commit, i):
375378 self .toFadeOut .add (branchRec , branchText )
376379 self .drawnRefs [branch ] = fullbranch
377380
378- if i == 0 :
381+ if i == 0 and self . first_parse :
379382 self .topref = self .prevRef
380383
381384 x += 1
@@ -421,7 +424,7 @@ def draw_tag(self, commit, i):
421424
422425 self .toFadeOut .add (tagRec , tagText )
423426
424- if i == 0 :
427+ if i == 0 and self . first_parse :
425428 self .topref = self .prevRef
426429
427430 x += 1
@@ -925,7 +928,7 @@ def draw_ref(self, commit, i, top, text="HEAD", color=m.BLUE):
925928 self .drawnRefs [text ] = ref
926929 self .prevRef = ref
927930
928- if i == 0 :
931+ if i == 0 and self . first_parse :
929932 self .topref = self .prevRef
930933
931934 def draw_dark_ref (self ):
0 commit comments