Title: Submodule.remove `module` parameter doc is unclear or incomplete · Issue #1712 · gitpython-developers/GitPython · GitHub
Open Graph Title: Submodule.remove `module` parameter doc is unclear or incomplete · Issue #1712 · gitpython-developers/GitPython
X Title: Submodule.remove `module` parameter doc is unclear or incomplete · Issue #1712 · gitpython-developers/GitPython
Description: The docstring for Submodule.remove documents the module parameter this way: GitPython/git/objects/submodule/base.py Lines 951 to 959 in 6f765a2 :param module: If True, the module checkout we point to will be deleted as well. If the modul...
Open Graph Description: The docstring for Submodule.remove documents the module parameter this way: GitPython/git/objects/submodule/base.py Lines 951 to 959 in 6f765a2 :param module: If True, the module checkout we point ...
X Description: The docstring for Submodule.remove documents the module parameter this way: GitPython/git/objects/submodule/base.py Lines 951 to 959 in 6f765a2 :param module: If True, the module checkout we point ...
Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/1712
X: @github
Domain: redirect.github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Submodule.remove `module` parameter doc is unclear or incomplete","articleBody":"The docstring for [`Submodule.remove`](https://github.com/gitpython-developers/GitPython/blob/main/git/objects/submodule/base.py#L941) documents the `module` parameter this way:\r\n\r\nhttps://github.com/gitpython-developers/GitPython/blob/6f765a2028e45a14853bf06801104cc6d22e053e/git/objects/submodule/base.py#L951-L959\r\n\r\nA sentence trails off in \"if you have modifications in the\" and it appears material is missing. This should be revised, but it is is unclear exactly what the intended meaning is, so I don't know for sure how to fix it.\r\n\r\nThe current phrasing appears to be the effect of an unsuccessful or incomplete [attempt](https://github.com/gitpython-developers/GitPython/commit/8e0e315a371cdfc80993a1532f938d56ed7acee4#diff-0d77f7389366948adb9b48c092150ac5c03033de1d89250748ae9add1e548eb5R512-R519), in 8e0e315, to fix a similar misphrasing. Compared to the [original wording](https://github.com/gitpython-developers/GitPython/commit/3d061a1a506b71234f783628ba54a7bdf79bbce9#diff-b783f55c358d34650a259d030b6ed9b67b611d205ed239027c861cad71b67d93R337-R345) in 3d061a1, the change was:\r\n\r\n```diff\r\n :param module: If True, the module we point to will be deleted \r\n as well. If the module is currently on a commit which is not part \r\n of any branch in the remote, if the currently checked out branch \r\n- is ahead of its tracking branch, if you have modifications in the\r\n working tree, or untracked files,\r\n+ is ahead of its tracking branch, if you have modifications in the\r\n In case the removal of the repository fails for these reasons, the \r\n submodule status will not have been altered.\r\n If this submodule has child-modules on its own, these will be deleted\r\n```\r\n\r\nSo the original wording also trailed off in mid-sentence, but differently, with \"working tree, or untracked files,\".\r\n\r\nI can *guess* the intended meaning:\r\n\r\n\u003e If True, the module checkout we point to will be deleted as well. If the module is currently on a commit which is not part of any branch in the remote, if the currently checked out branch is ahead of its tracking branch, or if there are modifications to the working tree or untracked files, then the removal will fail.\r\n\r\nIf that revision is correct, it could be clarified by a small amount of further rewording:\r\n\r\n\u003e If True, the checked out module we point to will be deleted as well. If that module is currently on a commit outside any branch in the remote, or if it is ahead of its tracking branch, or if there are modified or untracked files in its working tree, then the removal will fail.\r\n\r\nHowever, I am not sure enough that this is the intended meaning to have put either of those changes in a PR at this time.","author":{"url":"https://github.com/EliahKagan","@type":"Person","name":"EliahKagan"},"datePublished":"2023-10-17T23:17:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1712/GitPython/issues/1712"}
| 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:1afe1daf-358c-6115-9174-16d5decb2a8a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D988:1DC101:10A7ECC:16C75BE:69694242 |
| html-safe-nonce | 96ecca6f4a134a8cdc7edf0eafc6813cf55ce1e01e44549b7a35a729cc831325 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTg4OjFEQzEwMToxMEE3RUNDOjE2Qzc1QkU6Njk2OTQyNDIiLCJ2aXNpdG9yX2lkIjoiMjk5Mzc0NTY0NDc4NzE1NTUyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 743e26d2c00f582831625cc25435515507e833888a3baa382e38735895f47b6c |
| hovercard-subject-tag | issue:1948445094 |
| 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/gitpython-developers/GitPython/1712/issue_layout |
| twitter:image | https://opengraph.githubassets.com/41421ce4895f019b10cfed0bc507eab69621f32e40ce0cc966edd2e79784c556/gitpython-developers/GitPython/issues/1712 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/41421ce4895f019b10cfed0bc507eab69621f32e40ce0cc966edd2e79784c556/gitpython-developers/GitPython/issues/1712 |
| og:image:alt | The docstring for Submodule.remove documents the module parameter this way: GitPython/git/objects/submodule/base.py Lines 951 to 959 in 6f765a2 :param module: If True, the module checkout we point ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | EliahKagan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| 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 | d69ac0477df0f87da03b8b06cebd187012d7a930 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width