You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everything is fine, it's a repo-index version assertion, not a git version assertion.
This was very confusing because assert is on (1, 2) values and I have Git 2, but then I figured it's not about that.
The issue happened if I initialized an empty git repo with git init and then started aider.
Furthermore I tried commiting an empty .gitignore before starting aider and only then
aider pointed out that it only works with git repos with version number 1 or 2
The solution is to not start aider with an empty (uncommited) git repo, but rather just with an empty directory,
or if it's a git repo make sure it has a commit and is correct index-ver.
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "__main__.py", line 7, in <module>
sys.exit(main())
^^^^^^
File "main.py", line 861, in main
coder.run()
File "base_coder.py", line 741, in run
self.run_one(user_message, preproc)
File "base_coder.py", line 784, in run_one
list(self.send_message(message))
File "base_coder.py", line 1273, in send_message
saved_message = self.auto_commit(edited)
^^^^^^^^^^^^^^^^^^^^^^^^
File "base_coder.py", line 1968, in auto_commit
res = self.repo.commit(fnames=edited, context=context, aider_edits=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "repo.py", line 103, in commit
diffs = self.get_diffs(fnames)
^^^^^^^^^^^^^^^^^^^^^^
File "repo.py", line 230, in get_diffs
if not self.path_in_repo(fname):
^^^^^^^^^^^^^^^^^^^^^^^^
File "repo.py", line 384, in path_in_repo
tracked_files = set(self.get_tracked_files())
^^^^^^^^^^^^^^^^^^^^^^^^
File "repo.py", line 294, in get_tracked_files
staged_files = [path for path, _ in index.entries.keys()]
^^^^^^^^^^^^^
File "util.py", line 253, in __getattr__
self._set_cache_(attr)
File "base.py", line 168, in _set_cache_
self._deserialize(stream)
File "base.py", line 197, in _deserialize
self.version, self.entries, self._extension_data, _conten_sha = read_cache(stream)
^^^^^^^^^^^^^^^^^^
File "fun.py", line 252, in read_cache
version, num_entries = read_header(stream)
^^^^^^^^^^^^^^^^^^^
File "fun.py", line 210, in read_header
assert version in (1, 2)
^^^^^^^^^^^^^^^^^
AssertionError
The text was updated successfully, but these errors were encountered:
Everything is fine, it's a repo-index version assertion, not a git version assertion.
This was very confusing because assert is on (1, 2) values and I have Git 2, but then I figured it's not about that.
git init
and then startedaider
..gitignore
before startingaider
and only thenaider pointed out that it
only works with git repos with version number 1 or 2
aider
with an empty (uncommited) git repo, but rather just with an empty directory,or if it's a git repo make sure it has a commit and is correct index-ver.
Aider version: 0.64.1
Python version: 3.11.9
Platform: Windows-10-10.0.19045-SP0
Python implementation: CPython
Virtual environment: Yes
OS: Windows 10 (64bit)
Git version: git version 2.47.0.windows.2
An uncaught exception occurred:
The text was updated successfully, but these errors were encountered: