Skip to content

Commit d921ba0

Browse files
Update push subcommand pull-before-push language
Signed-off-by: Jacob Stopak <jacob@initialcommit.io>
1 parent b450730 commit d921ba0

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

git_sim/push.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,41 +99,51 @@ def construct(self):
9999
def failed_push(self, push_result):
100100
if push_result == 1:
101101
text1 = m.Text(
102-
f"'git push' failed since remote has commits that don't exist locally, run 'git pull' and try again",
102+
f"'git push' failed since the remote repo has commits that don't exist locally.",
103103
font="Monospace",
104104
font_size=20,
105105
color=self.fontColor,
106106
weight=m.BOLD,
107107
)
108-
text1.move_to([self.camera.frame.get_center()[0], 4, 0])
108+
text1.move_to([self.camera.frame.get_center()[0], 5, 0])
109109

110110
text2 = m.Text(
111-
f"Gold commits exist in remote repo, but not locally (need to be pulled)",
111+
f"Run 'git pull' (or 'git-sim pull' to simulate first) and then try again.",
112112
font="Monospace",
113113
font_size=20,
114-
color=m.GOLD,
114+
color=self.fontColor,
115115
weight=m.BOLD,
116116
)
117117
text2.move_to(text1.get_center()).shift(m.DOWN / 2)
118118

119119
text3 = m.Text(
120-
f"Red commits exist in both local and remote repos",
120+
f"Gold commits exist in remote repo, but not locally (need to be pulled).",
121121
font="Monospace",
122122
font_size=20,
123-
color=m.RED,
123+
color=m.GOLD,
124124
weight=m.BOLD,
125125
)
126126
text3.move_to(text2.get_center()).shift(m.DOWN / 2)
127127

128+
text4 = m.Text(
129+
f"Red commits exist in both local and remote repos.",
130+
font="Monospace",
131+
font_size=20,
132+
color=m.RED,
133+
weight=m.BOLD,
134+
)
135+
text4.move_to(text3.get_center()).shift(m.DOWN / 2)
136+
128137
self.toFadeOut.add(text1)
129138
self.toFadeOut.add(text2)
130139
self.toFadeOut.add(text3)
140+
self.toFadeOut.add(text4)
131141
self.recenter_frame()
132142
self.scale_frame()
133143
if settings.animate:
134-
self.play(m.AddTextLetterByLetter(text1), m.AddTextLetterByLetter(text2), m.AddTextLetterByLetter(text3))
144+
self.play(m.AddTextLetterByLetter(text2), m.AddTextLetterByLetter(text2), m.AddTextLetterByLetter(text3), m.AddTextLetterByLetter(text4))
135145
else:
136-
self.add(text1, text2, text3)
146+
self.add(text1, text2, text3, text4)
137147

138148

139149

0 commit comments

Comments
 (0)