Skip to content

Commit

Permalink
Doc: Clarify description of stash_unstaged_changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jwulfheide-gb committed Jul 17, 2024
1 parent 152fb36 commit 50c011d
Showing 1 changed file with 7 additions and 3 deletions.
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

0 comments on commit 50c011d

Please sign in to comment.