Title: Potential Race Condition Fix - OS Rename & Chmod - PermissionError by DEKHTIARJonathan · Pull Request #115 · gitpython-developers/gitdb · GitHub
Open Graph Title: Potential Race Condition Fix - OS Rename & Chmod - PermissionError by DEKHTIARJonathan · Pull Request #115 · gitpython-developers/gitdb
X Title: Potential Race Condition Fix - OS Rename & Chmod - PermissionError by DEKHTIARJonathan · Pull Request #115 · gitpython-developers/gitdb
Description: There is a really flaky and hard to debug bug when using gitdb at least on MacOS (M-Processor) using Docker (docker.io/python:3.13 image).
I have only been able to reproduce this error within pytest on my laptop (Apple M4 laptop).
I completely randomly get:
repo = Repo(........) # Repo Created using `GitPython`
[...]
repo.index.add("*")
~~~~~~~~~~~~~~^^^^^
File "/usr/local/lib/python3.13/site-packages/git/index/base.py", line 885, in add
entries_added.extend(self._entries_for_paths(paths, path_rewriter, fprogress, entries))
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/git/util.py", line 176, in wrapper
return func(self, *args, **kwargs)
File "/usr/local/lib/python3.13/site-packages/git/index/util.py", line 111, in set_git_working_dir
return func(self, *args, **kwargs)
File "/usr/local/lib/python3.13/site-packages/git/index/base.py", line 745, in _entries_for_paths
entries_added.append(self._store_path(filepath, fprogress))
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/git/index/base.py", line 698, in _store_path
istream = self.repo.odb.store(IStream(Blob.type, st.st_size, stream))
File "/usr/local/lib/python3.13/site-packages/gitdb/db/loose.py", line 233, in store
chmod(obj_path, self.new_objects_mode)
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 1] Operation not permitted: '/git_projects/
Open Graph Description: There is a really flaky and hard to debug bug when using gitdb at least on MacOS (M-Processor) using Docker (docker.io/python:3.13 image). I have only been able to reproduce this error within pytes...
X Description: There is a really flaky and hard to debug bug when using gitdb at least on MacOS (M-Processor) using Docker (docker.io/python:3.13 image). I have only been able to reproduce this error within pytes...
Opengraph URL: https://github.com/gitpython-developers/gitdb/pull/115
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:da5316d8-9dbf-850a-5f67-db72b8c34fd5 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B910:3FCB2B:D889C3:11FB4C8:69687A59 |
| html-safe-nonce | bb6a20bec47424b959330bb0fbaea1256402a0b7460cb1abdc3774a5042e7ad3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTEwOjNGQ0IyQjpEODg5QzM6MTFGQjRDODo2OTY4N0E1OSIsInZpc2l0b3JfaWQiOiI2Mzk1OTM3NDcyMTU0OTkxMTkzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f469b1a2593858435ad83e41fbededa802888d424746871f7d13b66b6f41605b |
| hovercard-subject-tag | pull_request:2250142158 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/gitpython-developers/gitdb/pull/115/files |
| twitter:image | https://avatars.githubusercontent.com/u/10923599?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/10923599?s=400&v=4 |
| og:image:alt | There is a really flaky and hard to debug bug when using gitdb at least on MacOS (M-Processor) using Docker (docker.io/python:3.13 image). I have only been able to reproduce this error within pytes... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 50f46dc2d6192249fd8ebf20e76c800f4f2596d4a5f3ab63dd63a754df154f54 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/gitpython-developers/gitdb git https://github.com/gitpython-developers/gitdb.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126093 |
| octolytics-dimension-repository_nwo | gitpython-developers/gitdb |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126093 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/gitdb |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | fef287f17234b4529a4b112a3d47fe8551e32ddd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width