MCPcopy
hub / github.com/gitless-vcs/gitless / abort_fuse

Method abort_fuse

gitless/core.py:1135–1144  ·  view source on GitHub ↗
(self, op_cb=None)

Source from the content-addressed store, hash-verified

1133 return self.gl_repo._ref_exists('GL_FUSE_ORIG_HEAD')
1134
1135 def abort_fuse(self, op_cb=None):
1136 if not self.fuse_in_progress:
1137 raise GlError('No fuse in progress, nothing to abort')
1138 git_repo = self.gl_repo.git_repo
1139 git_repo.set_head(git_repo.lookup_reference('GL_FUSE_ORIG_HEAD').target)
1140 git_repo.reset(git_repo.head.peel().hex, pygit2.GIT_RESET_HARD)
1141
1142 self._state_cleanup()
1143 restore_fn = op_cb.restore_ok if op_cb else None
1144 self._safe_restore(_stash_msg_fuse, restore_fn=restore_fn)
1145
1146 def _state_cleanup(self):
1147 self.gl_repo.git_repo.state_cleanup()

Callers 1

mainFunction · 0.80

Calls 3

_state_cleanupMethod · 0.95
_safe_restoreMethod · 0.95
GlErrorClass · 0.85

Tested by

no test coverage detected