Closed max-sixty closed 1 year ago
I'm pretty sure it's this unwrap
:
https://github.com/martinvonz/jj/blob/c82a62cf99181579d94ccf36611be9d40c20c330/lib/src/repo.rs#L777
I wonder if this is a symptom of a shallowly cloned repo, or of only a part of the tree being checked out. It would be nice to have an error that explains which feature relevant to a particular repo jj
doesn't support :).
I agree, it does seem to be that line. @max-sixty, how did you create the repo? By a regular git clone
and then jj init --git-repo=.
in the clone? Did you use shallow or partial clone?
And yes, we should obviously propagate that error instead of panicking.
I think I had a git repo from a normal git clone
, and then ran that command...
I think I had a git repo from a normal
git clone
, and then ran that command...
Hmm, then you probably have a .jj/
directory next to your .git/
directory, right? If that directory is from last time you tried jj, it might be an incompatibility. We try to automatically upgrade the repo if necessary, but only when you upgrade jj
one minor version (e.g. 0.5.x to 0.6.x). Try removing the .jj/
directory, and then run jj init --git-repo=.
to set it up again.
If that's directory is from last time you tried jj, it might be an incompatibility. We try to automatically upgrade the repo if necessary, but only when you upgrade
jj
one minor version (e.g. 0.5.x to 0.6.x).
That's correct, it works!
I'll close. BTW it would be fine it the error said "your repo is out of date, please delete and rebuild", way better than a panic; hope that's reasonable to say.
Looking forward to exploring jj
more!
I'll close. BTW it would be fine it the error said "your repo is out of date, please delete and rebuild", way better than a panic; hope that's reasonable to say.
Agreed. We have some work on making jj error out both on too old and too new repos. I've also started working on making the error you ran into at least not be a panic.
Description
Steps to Reproduce the Problem
I've been excited about
jj
for a while and tried it when it first came out. I just went to try using it again to see if it was more stable.Unfortunately I got a panic on my first command:
Unfortunately I can't share the repo or its state, but happy to try again if the panic is turned into an error in a future version.
Specifications