(self, msg_fn, restore_fn=None)
| 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): |
no test coverage detected