We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4eac7a9 commit 0309191Copy full SHA for 0309191
src/scmrepo/git/__init__.py
@@ -410,7 +410,7 @@ def detach_head(
410
self.reset()
411
412
@contextmanager
413
- def stash_workspace(self, **kwargs):
+ def stash_workspace(self, reinstate_index=False, **kwargs):
414
"""Stash and restore any workspace changes.
415
416
Yields revision of the stash commit. Yields None if there were no
@@ -423,7 +423,7 @@ def stash_workspace(self, **kwargs):
423
finally:
424
if rev:
425
logger.debug("Restoring stashed workspace")
426
- self.stash.pop()
+ self.stash.pop(reinstate_index=reinstate_index)
427
428
def _reset(self) -> None:
429
self.backends.reset_all()
0 commit comments