Title: Sorting in TreeModifier.set_done() seems to be inconsistent with git's own sorting -> breaks repository · Issue #369 · gitpython-developers/GitPython · GitHub
Open Graph Title: Sorting in TreeModifier.set_done() seems to be inconsistent with git's own sorting -> breaks repository · Issue #369 · gitpython-developers/GitPython
X Title: Sorting in TreeModifier.set_done() seems to be inconsistent with git's own sorting -> breaks repository · Issue #369 · gitpython-developers/GitPython
Description: git enforces tree objects to be sorted by name. GitPython enables users to sort their tree's by calling TreeModifier.set_done(), see: https://github.com/gitpython-developers/GitPython/blob/master/git/objects/tree.py#L45 This sorting some...
Open Graph Description: git enforces tree objects to be sorted by name. GitPython enables users to sort their tree's by calling TreeModifier.set_done(), see: https://github.com/gitpython-developers/GitPython/blob/master/g...
X Description: git enforces tree objects to be sorted by name. GitPython enables users to sort their tree's by calling TreeModifier.set_done(), see: https://github.com/gitpython-developers/GitPython/blob/mast...
Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/369
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sorting in TreeModifier.set_done() seems to be inconsistent with git's own sorting -\u003e breaks repository","articleBody":"git enforces tree objects to be sorted by name. GitPython enables users to sort their tree's by calling TreeModifier.set_done(), see:\nhttps://github.com/gitpython-developers/GitPython/blob/master/git/objects/tree.py#L45\n\nThis sorting somehow seems to be inconsistent with git's own sorting mechanism, which means adding a tree might break the git repository. This means \"git fsck\" will throw errors and some remotes (gitlab for example) will no accept the commit. Anyways this bug leaves the git object store in an broken state which cannot be fixed easily, especially if there is much history after the broken commit/tree. I had to delete multiple branches from projects I manage because of their broken state so far.\n\nAbout the problem itself:\n\nGitPython uses core Python functions to sort the file list. This looks correct, but has one major difference to what git itself does. If you have two files beginning with the same chars (for example \"file\" and \"file.second\") their ordering will differ:\n\nWhat git does:\n1) \"file.second\"\n2) \"file\"\n\nWhat GitPython does:\n1) \"file\"\n2) \"file.second\"\n\nWe found this problem using fabdeploit for deployments using git, which allows us to add/removed files to/from the git repository. This way tree's will be modified which means sorting is essential.\n\nPlease fix this. ;-)\n","author":{"url":"https://github.com/ddanier","@type":"Person","name":"ddanier"},"datePublished":"2015-12-08T08:46:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/369/GitPython/issues/369"}
| 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:91f86c29-bf50-8b5a-2983-2a15b91d7f7e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 91CC:18E811:352164B:35D24B2:6968511C |
| html-safe-nonce | a334d722f7a44fe3806bdf6e82860381355b88ddb817100b1f84052fba035e22 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUNDOjE4RTgxMTozNTIxNjRCOjM1RDI0QjI6Njk2ODUxMUMiLCJ2aXNpdG9yX2lkIjoiNjk2MTAxNDU4MTE0NDA4MDY2OCIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | a946d790b0081b43a596c79dca56a75c15a7ad42faf0a31d3adc6c79ea49e2ac |
| hovercard-subject-tag | issue:120960928 |
| 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/369/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b5345c61e76fe02e56d6462c2967bcf55a2f5f7832984e8baacaba0a05d8698f/gitpython-developers/GitPython/issues/369 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b5345c61e76fe02e56d6462c2967bcf55a2f5f7832984e8baacaba0a05d8698f/gitpython-developers/GitPython/issues/369 |
| og:image:alt | git enforces tree objects to be sorted by name. GitPython enables users to sort their tree's by calling TreeModifier.set_done(), see: https://github.com/gitpython-developers/GitPython/blob/master/g... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ddanier |
| hostname | github.com |
| expected-hostname | github.com |
| None | f16c57f41ed243e5b4dfe9b9bcd6828bd83080b1b6dbb4ff239bbe9745f12e0c |
| 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 | cfa7062cc6d4fe8fcb156bd33f4c97bd3b2470af |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width