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

Method _safe_restore

gitless/core.py:1167–1177  ·  view source on GitHub ↗
(self, msg_fn, restore_fn=None)

Source from the content-addressed store, hash-verified

1165 git_repo.reset(cid, pygit2.GIT_RESET_SOFT)
1166
1167 def _safe_restore(self, msg_fn, restore_fn=None):
1168 s_id, _ = _stash(msg_fn(self))
1169 if s_id:
1170 try:
1171 git.stash.pop(s_id)
1172 if restore_fn:
1173 restore_fn()
1174 except ErrorReturnCode:
1175 raise ApplyFailedError(
1176 'Uncommitted changes failed to apply onto the new head of the '
1177 'branch')
1178
1179
1180 def create_commit(self, files, msg, author=None, partials=None):

Callers 5

mergeMethod · 0.95
merge_continueMethod · 0.95
fuseMethod · 0.95
_fuseMethod · 0.95
abort_fuseMethod · 0.95

Calls 2

_stashFunction · 0.85
ApplyFailedErrorClass · 0.85

Tested by

no test coverage detected