Skip to content

Commit 50c011d

Browse files
committed
Doc: Clarify description of stash_unstaged_changes
1 parent 152fb36 commit 50c011d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

autohooks/api/git.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,13 @@ def _apply_diff(patch: bytes) -> None:
333333

334334
class stash_unstaged_changes: # pylint: disable=invalid-name
335335
"""
336-
A context manager that stashes changes on tracked files that are not added
337-
to the index. The stashed changes are restored when the context manager
338-
exits.
336+
A context manager that stashes changes that
337+
- are not staged, and
338+
- affect files that are partially staged.
339+
Changes that are made before the context manager exits, are added to the
340+
index.
341+
342+
The stashed changes are restored when the context manager exits.
339343
340344
Example: ::
341345

0 commit comments

Comments
 (0)