Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc: Clarify description of stash_unstaged_changes #672

Merged
merged 8 commits into from
Nov 13, 2024
10 changes: 7 additions & 3 deletions autohooks/api/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,13 @@ def _apply_diff(patch: bytes) -> None:

class stash_unstaged_changes: # pylint: disable=invalid-name
"""
A context manager that stashes changes on tracked files that are not added
to the index. The stashed changes are restored when the context manager
exits.
A context manager that stashes changes that
- are not staged, and
- affect files that are partially staged.
Changes that are made before the context manager exits, are added to the
index.

The stashed changes are restored when the context manager exits.

Example: ::

Expand Down
Loading