Title: Can't bump without using annotated_tag · Issue #879 · commitizen-tools/commitizen · GitHub
Open Graph Title: Can't bump without using annotated_tag · Issue #879 · commitizen-tools/commitizen
X Title: Can't bump without using annotated_tag · Issue #879 · commitizen-tools/commitizen
Description: Description Description and code analysis When running cz bump with commitizen 3.10.0 and git 2.34.1, a commit is performed, but the command hangs out indefinitely when trying to tag. I debug the code, and it hangs in: commitizen/git.py ...
Open Graph Description: Description Description and code analysis When running cz bump with commitizen 3.10.0 and git 2.34.1, a commit is performed, but the command hangs out indefinitely when trying to tag. I debug the c...
X Description: Description Description and code analysis When running cz bump with commitizen 3.10.0 and git 2.34.1, a commit is performed, but the command hangs out indefinitely when trying to tag. I debug the c...
Opengraph URL: https://github.com/commitizen-tools/commitizen/issues/879
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can't bump without using annotated_tag","articleBody":"### Description\r\n\r\n# Description and code analysis\r\n\r\nWhen running `cz bump` with commitizen 3.10.0 and git 2.34.1, a commit is performed, but the command hangs out indefinitely when trying to tag.\r\n\r\nI debug the code, and it hangs in: `commitizen/git.py` when running `cmd.run`, because without settings annotated or lightweight tag, the command it tries to launch (without the _opt parameter then), results in `git tag 0.2.0`, which if you'd run it in a terminal, would open an editor to add a message.\r\nThis does not happen when specify lightweight or annotated message because then the message is added:\r\n```\r\ndef tag(tag: str, annotated: bool = False, signed: bool = False) -\u003e cmd.Command:\r\n _opt = \"\"\r\n if annotated:\r\n _opt = f\"-a {tag} -m\"\r\n if signed:\r\n _opt = f\"-s {tag} -m\"\r\n c = cmd.run(f\"git tag {_opt} {tag}\")\r\n return c\r\n```\r\nWithout those options, in `commitizen/cmd.py`, the stderr value returned by `process.communicate` hangs out, and the stacktrace produce by a SIGTERM specify:\r\n```\r\nb\"Vim: Warning: Output is not to a terminal\\nVim: Warning: Input is not from a terminal\\n\\r\\nerror: There was a problem with the editor '/usr/bin/vim'.\\nPlease supply the message using either -m \r\nor -F option.\\n\"\r\n```\r\nThe same appears with vi, if git is configured with vi (`git config --global core.editor /usr/bin/vi`).\r\n\r\n# Draft of solution\r\n\r\nI did not dig any further, so maybe I'll be irrelevant here, but would it be relevant to always specify a commit message, or maybe add a `-m \"\"`\r\n\r\nGreat tool anyway!\r\n\r\n### Steps to reproduce\r\n\r\n1. Run cz bump, without lightweight or annotated tag setup enabled\r\n\r\n### Current behavior\r\n\r\nWhen running `cz bump` with commitizen 3.10.0 and git 2.34.1, a commit is performed, but the command hangs out indefinitely when trying to tag.\r\nSo the command fails, and the state becomes inconsistent, because of a bump commit in git, without a tag associated with it.\r\n\r\n### Desired behavior\r\n\r\nThe tag is performed successfully during the bump.\r\n\r\n### Screenshots\r\n\r\n_No response_\r\n\r\n### Environment\r\n\r\nCommitizen Version: 3.10.0\r\nPython Version: 3.9.7 (default, Mar 21 2023, 20:41:25) \r\n[GCC 11.3.0]\r\nOperating System: Linux\r\nGit 2.34.1","author":{"url":"https://github.com/CharlesAracil","@type":"Person","name":"CharlesAracil"},"datePublished":"2023-10-05T10:31:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/879/commitizen/issues/879"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5f2787fd-6b8a-ce4f-f470-8b4cca59e46e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C016:2C07F4:3EFA56:56D8A2:6A4DC661 |
| html-safe-nonce | 0aa3f4031974f643d963eed35316a69e6271442174216771790e39192e77fbb1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDE2OjJDMDdGNDozRUZBNTY6NTZEOEEyOjZBNERDNjYxIiwidmlzaXRvcl9pZCI6IjE0OTAzMzAxMjU2NjQ2MzQ0NjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 51f4974bff215b91bcc064163990865f4dddd7e82fa531b832f45d7bf43f9e4a |
| hovercard-subject-tag | issue:1927957552 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/commitizen-tools/commitizen/879/issue_layout |
| twitter:image | https://opengraph.githubassets.com/506b1eb44776351ec3a2be8e34ed653a36278c51a5f62a9a9424fec32c341034/commitizen-tools/commitizen/issues/879 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/506b1eb44776351ec3a2be8e34ed653a36278c51a5f62a9a9424fec32c341034/commitizen-tools/commitizen/issues/879 |
| og:image:alt | Description Description and code analysis When running cz bump with commitizen 3.10.0 and git 2.34.1, a commit is performed, but the command hangs out indefinitely when trying to tag. I debug the c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | CharlesAracil |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git |
| octolytics-dimension-user_id | 62252524 |
| octolytics-dimension-user_login | commitizen-tools |
| octolytics-dimension-repository_id | 106127589 |
| octolytics-dimension-repository_nwo | commitizen-tools/commitizen |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 106127589 |
| octolytics-dimension-repository_network_root_nwo | commitizen-tools/commitizen |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width