Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/scmrepo/git/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def detach_head(
self.reset()

@contextmanager
def stash_workspace(self, **kwargs):
def stash_workspace(self, reinstate_index=False, **kwargs):
"""Stash and restore any workspace changes.

Yields revision of the stash commit. Yields None if there were no
Expand All @@ -423,7 +423,7 @@ def stash_workspace(self, **kwargs):
finally:
if rev:
logger.debug("Restoring stashed workspace")
self.stash.pop()
self.stash.pop(reinstate_index=reinstate_index)

def _reset(self) -> None:
self.backends.reset_all()
Expand Down