@contextlib.contextmanager<EOL>def staged_files_only(patch_dir):
with _intent_to_add_cleared(), _unstaged_changes_cleared(patch_dir):<EOL><INDENT>yield<EOL><DEDENT>
Clear any unstaged changes from the git working directory inside this
    context.