Return a list of files that are staged for commit and have changed compared to the merge base with the given branch. Only includes modified or added files (excludes deleted files).
(branch)
| 74 | |
| 75 | |
| 76 | def get_changed_files(branch): |
| 77 | """ |
| 78 | Return a list of files that are staged for commit and have changed |
| 79 | compared to the merge base with the given branch. |
| 80 | Only includes modified or added files (excludes deleted files). |
| 81 | """ |
| 82 | base = get_merge_base(branch) |
| 83 | return run(f"git diff --cached --name-only --diff-filter=d {base}", |
| 84 | cwd=get_top()).splitlines() |
| 85 | |
| 86 | |
| 87 | def get_all_files(): |
no test coverage detected