jj
jj copied to clipboard
Error: object not found - no match for id
Description
I've noticed that some time since last week I've stopped being able to use jj to push to GitHub. I always get this error:
$ jj git push --branch dmiller/streamline-esbuild-npm-interop
Branch changes to push to origin:
Add branch dmiller/streamline-esbuild-npm-interop to 716e5543254e
Error: object not found - no match for id (2db67d57e55cfdb085fb09ee4b337885c5371e73); class=Odb (9); code=NotFound (-3)
But 2db67d57e55cfdb085fb09ee4b337885c5371e73
is a git commit from a couple months ago and does not appear in the "branch" that I am pushing.
Both git show 2db67d57e55cfdb085fb09ee4b337885c5371e73
and jj show 2db67d57e55cfdb085fb09ee4b337885c5371e73
work.
@martinvonz said in Discord:
It's interesting that
jj show 2db67d57e55cfdb085fb09ee4b337885c5371e73
works. I think that means gitoxide is able to find the object but libgit2 isn't. Maybe it's stored in some kind of modern format that libgit2 doesn't support.
If I re-clone the repository this doesn't happen.
Steps to Reproduce the Problem
Unfortunately I'm not sure how to get a repository in to this state. Even a clone of the same repository doesn't exhibit the issue.
Expected Behavior
I can run jj git push
Actual Behavior
jj git push
fails with Error: object not found
Specifications
- Platform: macOS arm64
- Version: 0.14.0
@martinvonz I just remembered something: I think last week at one point I deleted the .jj
directory in this repo because I had, to my eyes, well and truly hosed it. I then re-ran jj init
. Could that have contributed to this?
@martinvonz I just remembered something: I think last week at one point I deleted the
.jj
directory in this repo because I had, to my eyes, well and truly hosed it. I then re-ranjj init
. Could that have contributed to this?
I'm not sure, but I can't think of a way it would have contributed.
Can you share your repo somehow?
Suppose the git repo is in unusual state, git fsck
might help. It will report some "dangling commit"/"tree", which is okay afaik. If it reported other errors, the repository might corrupt.