(
tag: str, annotated: bool = False, signed: bool = False, msg: str | None = None
)
| 165 | |
| 166 | |
| 167 | def tag( |
| 168 | tag: str, annotated: bool = False, signed: bool = False, msg: str | None = None |
| 169 | ) -> cmd.Command: |
| 170 | if not annotated and not signed: |
| 171 | return cmd.run(["git", "tag", tag]) |
| 172 | |
| 173 | # according to https://git-scm.com/book/en/v2/Git-Basics-Tagging, |
| 174 | # we're not able to create lightweight tag with message. |
| 175 | # by adding message, we make it a annotated tags |
| 176 | option = "-s" if signed else "-a" # The else case is for annotated tags |
| 177 | return cmd.run(["git", "tag", option, tag, "-m", msg or tag]) |
| 178 | |
| 179 | |
| 180 | def add(*args: str) -> cmd.Command: |
nothing calls this directly
no outgoing calls
no test coverage detected