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

Method reset_head

src/git_sim/git_sim_base_command.py:987–1005  ·  view source on GitHub ↗
(self, hexsha, shift=numpy.array([0.0, 0.0, 0.0]))

Source from the content-addressed store, hash-verified

985 )
986
987 def reset_head(self, hexsha, shift=numpy.array([0.0, 0.0, 0.0])):
988 if settings.animate:
989 self.play(
990 self.drawnRefs["HEAD"].animate.move_to(
991 (
992 self.drawnCommits[hexsha].get_center()[0] + shift[0],
993 self.drawnCommits[hexsha].get_center()[1] + 2.0 + shift[1],
994 0,
995 )
996 ),
997 )
998 else:
999 self.drawnRefs["HEAD"].move_to(
1000 (
1001 self.drawnCommits[hexsha].get_center()[0] + shift[0],
1002 self.drawnCommits[hexsha].get_center()[1] + 2.0 + shift[1],
1003 0,
1004 )
1005 )
1006
1007 def reset_branch(self, hexsha, shift=numpy.array([0.0, 0.0, 0.0])):
1008 if settings.animate:

Callers 2

constructMethod · 0.80
constructMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected