Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork938
Open
Description
Hi.
I've encounteredAssertionError
while callinggit.base.IndexFile.iter_blobs
aftergit update-index --skip-worktree <some_file>
like below.
%pip install GitPython==3.1.11Requirement already satisfied: GitPython==3.1.11 in /usr/local/python3.7/lib/python3.7/site-packages (3.1.11)Requirement already satisfied: gitdb<5,>=4.0.1 in /usr/local/python3.7/lib/python3.7/site-packages (from GitPython==3.1.11) (4.0.5)Requirement already satisfied: smmap<4,>=3.0.1 in /usr/local/python3.7/lib/python3.7/site-packages (from gitdb<5,>=4.0.1->GitPython==3.1.11) (3.0.4)%cd $(mktemp -d) %git init . Initialized empty Git repository in /tmp/tmp.JXLEk4zfdj/.git/%touch foo %git add foo %git update-index --skip-worktree foo%python3 -c ' import git with git.Repo(".", search_parent_directories=True) as repo: print(*repo.index.iter_blobs())'Traceback (most recent call last): File "<string>", line 4, in <module> File "/usr/local/python3.7/lib/python3.7/site-packages/git/index/base.py", line 441, in iter_blobs for entry in self.entries.values(): File "/usr/local/python3.7/lib/python3.7/site-packages/gitdb/util.py", line 253, in __getattr__ self._set_cache_(attr) File "/usr/local/python3.7/lib/python3.7/site-packages/git/index/base.py", line 128, in _set_cache_ self._deserialize(stream) File "/usr/local/python3.7/lib/python3.7/site-packages/git/index/base.py", line 157, in _deserialize self.version, self.entries, self._extension_data, _conten_sha = read_cache(stream) File "/usr/local/python3.7/lib/python3.7/site-packages/git/index/fun.py", line 185, in read_cache version, num_entries = read_header(stream) File "/usr/local/python3.7/lib/python3.7/site-packages/git/index/fun.py", line 165, in read_header assert version in (1, 2)AssertionError
It's not an urgent issue for me because aftergit update-index --no-skip-worktree
it works without any problems, but if you have spare time can you please support git index withskip-worktree
?