Apply a stashed state and remove it from the stash list. For arguments, see Repository.stash_apply().
(
self,
index: int = 0,
reinstate_index: bool = False,
strategy: CheckoutStrategy | None = None,
callbacks: StashApplyCallbacks | None = None,
)
| 1371 | check_error(C.git_stash_drop(self._repo, index)) |
| 1372 | |
| 1373 | def stash_pop( |
| 1374 | self, |
| 1375 | index: int = 0, |
| 1376 | reinstate_index: bool = False, |
| 1377 | strategy: CheckoutStrategy | None = None, |
| 1378 | callbacks: StashApplyCallbacks | None = None, |
| 1379 | ) -> None: |
| 1380 | """Apply a stashed state and remove it from the stash list. |
| 1381 | |
| 1382 | For arguments, see Repository.stash_apply(). |
| 1383 | """ |
| 1384 | with git_stash_apply_options( |
| 1385 | reinstate_index=reinstate_index, |
| 1386 | strategy=strategy, |
| 1387 | callbacks=callbacks, |
| 1388 | ) as payload: |
| 1389 | err = C.git_stash_pop(self._repo, index, payload.stash_apply_options) |
| 1390 | payload.check_error(err) |
| 1391 | |
| 1392 | # |
| 1393 | # Utility for writing a tree into an archive |