(paths: list[str])
| 451 | assert testrepo.status()['untracked2.txt'] == FileStatus.WT_NEW |
| 452 | |
| 453 | def stash_pathspecs(paths: list[str]) -> bool: |
| 454 | stash_id = testrepo.stash( |
| 455 | sig, message=stash_message, keep_all=True, paths=paths |
| 456 | ) |
| 457 | stash_commit = testrepo[stash_id].peel(pygit2.Commit) |
| 458 | stash_diff = testrepo.diff(stash_commit.parents[0], stash_commit) |
| 459 | stash_files = set( |
| 460 | patch.delta.new_file.path for patch in utils.diff_safeiter(stash_diff) |
| 461 | ) |
| 462 | return stash_files == set(paths) |
| 463 | |
| 464 | # Stash a modified file |
| 465 | assert stash_pathspecs(['hello.txt']) |
no test coverage detected
searching dependent graphs…