Get the list of files that were committed in the requested git reference. :param git_reference: a git reference as accepted by `git show`, default: the last commit :returns: file names committed in the last commit by default or inside the passed git reference
(git_reference: str = "")
| 222 | |
| 223 | |
| 224 | def get_filenames_in_commit(git_reference: str = "") -> list[str]: |
| 225 | """Get the list of files that were committed in the requested git reference. |
| 226 | |
| 227 | :param git_reference: a git reference as accepted by `git show`, default: the last commit |
| 228 | |
| 229 | :returns: file names committed in the last commit by default or inside the passed git reference |
| 230 | """ |
| 231 | cmd_args = ["git", "show", "--name-only", "--pretty=format:"] |
| 232 | if git_reference: |
| 233 | cmd_args.append(git_reference) |
| 234 | c = cmd.run(cmd_args) |
| 235 | if c.return_code == 0: |
| 236 | return c.out.strip().split("\n") |
| 237 | raise GitCommandError(c.err) |
| 238 | |
| 239 | |
| 240 | def get_tags( |
nothing calls this directly
no test coverage detected