MCPcopy Index your code
hub / github.com/initialcommit-com/git-sim / construct

Method construct

src/git_sim/commit.py:40–84  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

38 )
39
40 def construct(self):
41 if not settings.stdout and not settings.output_only_path and not settings.quiet:
42 print(f"{settings.INFO_STRING} {self.cmd}")
43
44 self.show_intro()
45 head_commit = self.get_commit()
46
47 if self.amend:
48 tree = self.repo.tree()
49 amended = git.Commit.create_from_tree(
50 self.repo,
51 tree,
52 self.message,
53 )
54 head_commit = amended
55
56 self.parse_commits(head_commit)
57 self.center_frame_on_commit(head_commit)
58
59 if not self.amend:
60 self.setup_and_draw_parent(head_commit, self.message)
61 else:
62 self.draw_ref(head_commit, self.drawnCommitIds[amended.hexsha])
63 self.draw_ref(
64 head_commit,
65 self.drawnRefs["HEAD"],
66 text=self.repo.active_branch.name,
67 color=m.GREEN,
68 )
69
70 self.recenter_frame()
71 self.scale_frame()
72
73 if not self.amend:
74 self.reset_head_branch("abcdef")
75 self.vsplit_frame()
76 self.setup_and_draw_zones(
77 first_column_name="Working directory",
78 second_column_name="Staged files",
79 third_column_name="New commit",
80 )
81
82 self.show_command_as_title()
83 self.fadeout()
84 self.show_outro()
85
86 def populate_zones(
87 self,

Callers

nothing calls this directly

Calls 14

show_introMethod · 0.80
get_commitMethod · 0.80
parse_commitsMethod · 0.80
draw_refMethod · 0.80
recenter_frameMethod · 0.80
scale_frameMethod · 0.80
reset_head_branchMethod · 0.80
vsplit_frameMethod · 0.80
setup_and_draw_zonesMethod · 0.80
show_command_as_titleMethod · 0.80
fadeoutMethod · 0.80

Tested by

no test coverage detected