@@ -19,18 +19,17 @@ def __init__(self):
19
19
self .drawnCommits = {}
20
20
self .drawnRefs = {}
21
21
self .drawnCommitIds = {}
22
- self .zoomOuts = 0
23
22
self .toFadeOut = m .Group ()
24
- self .trimmed = False
25
23
self .prevRef = None
26
24
self .topref = None
27
25
self .n_default = settings .n_default
28
26
self .n = settings .n
29
27
self .n_orig = self .n
30
28
self .selected_branches = []
31
- self .stop = False
32
29
self .zone_title_offset = 2.6 if platform .system () == "Windows" else 2.6
33
30
self .arrow_map = []
31
+ self .all = settings .all
32
+ self .first_parse = True
34
33
35
34
self .logo = m .ImageMobject (settings .logo )
36
35
self .logo .width = 3
@@ -97,6 +96,7 @@ def parse_commits(
97
96
if i == 0 and len (self .drawnRefs ) < 2 :
98
97
self .draw_dark_ref ()
99
98
99
+ self .first_parse = False
100
100
if i < self .n :
101
101
i += 1
102
102
commitParents = list (commit .parents )
@@ -110,6 +110,11 @@ def parse_commits(
110
110
for p in range (len (commitParents )):
111
111
self .parse_commits (commitParents [p ], i , circle )
112
112
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
+
113
118
def show_intro (self ):
114
119
if settings .animate and settings .show_intro :
115
120
self .add (self .logo )
@@ -195,7 +200,7 @@ def draw_commit(self, commit, i, prevCircle, shift=numpy.array([0.0, 0.0, 0.0]))
195
200
)
196
201
197
202
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 )
199
204
200
205
isNewCommit = commit .hexsha not in self .drawnCommits
201
206
@@ -324,7 +329,7 @@ def draw_head(self, commit, i, commitId):
324
329
self .drawnRefs ["HEAD" ] = head
325
330
self .prevRef = head
326
331
327
- if i == 0 :
332
+ if i == 0 and self . first_parse :
328
333
self .topref = self .prevRef
329
334
330
335
def draw_branch (self , commit , i ):
@@ -340,8 +345,6 @@ def draw_branch(self, commit, i):
340
345
branches .insert (0 , branches .pop (branches .index (selected_branch )))
341
346
342
347
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
345
348
if (
346
349
not self .is_remote_tracking_branch (branch ) # local branch
347
350
and commit .hexsha == self .repo .heads [branch ].commit .hexsha
@@ -375,7 +378,7 @@ def draw_branch(self, commit, i):
375
378
self .toFadeOut .add (branchRec , branchText )
376
379
self .drawnRefs [branch ] = fullbranch
377
380
378
- if i == 0 :
381
+ if i == 0 and self . first_parse :
379
382
self .topref = self .prevRef
380
383
381
384
x += 1
@@ -421,7 +424,7 @@ def draw_tag(self, commit, i):
421
424
422
425
self .toFadeOut .add (tagRec , tagText )
423
426
424
- if i == 0 :
427
+ if i == 0 and self . first_parse :
425
428
self .topref = self .prevRef
426
429
427
430
x += 1
@@ -925,7 +928,7 @@ def draw_ref(self, commit, i, top, text="HEAD", color=m.BLUE):
925
928
self .drawnRefs [text ] = ref
926
929
self .prevRef = ref
927
930
928
- if i == 0 :
931
+ if i == 0 and self . first_parse :
929
932
self .topref = self .prevRef
930
933
931
934
def draw_dark_ref (self ):
0 commit comments