-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic on jj file annotate
on an unshallow'd repository
#5909
Comments
Perhaps, we'll have to address this when adding support for revision ranges (or depth) to annotate. Such option will help write tests. |
I don't think this is an issue about depth, it is an issue with the import of the underlying git structure. On a shallow repository, jj behaves correctly (or at least, like git), and blames the oldest fetched commit for the changes. The issue occurs once we unshallow the repository, where jj does not import the commits between zzzzzz and the last head, even though git has filled them in. Using the above example, one can clearly see the difference between git log and jj log -r all(). |
Oh, you mean this isn't a problem specific to |
Ok, thanks. Thinking about this, there are actually two issues:
|
I think
Yes. I believe various |
As described in jj-vcs#5909, in the case where jj was initialized in a shallowly cloned repository which was then unshallow'd, jj does not import the fetched commits that were outside the shallow boundary. However, it does import the ones after the boundary, which after unshallowing do not contain the changes made before the boundary. Therefore, when running annotate in such a case, jj would panic because it does not find the commit from which a line originates. This simply sets the empty commit as carrying the blame for that line.
As described in jj-vcs#5909, in the case where jj was initialized in a shallowly cloned repository which was then unshallow'd, jj does not import the fetched commits that were outside the shallow boundary. However, it does import the ones after the boundary, which after unshallowing do not contain the changes made before the boundary. Therefore, when running annotate in such a case, jj would panic because it does not find the commit from which a line originates. This sets the empty commit as carrying the blame for that line.
As described in jj-vcs#5909, in the case where jj was initialized in a shallowly cloned repository which was then unshallow'd, jj does not import the fetched commits that were outside the shallow boundary. However, it does import the ones after the boundary, which after unshallowing do not contain the changes made before the boundary. Therefore, when running annotate in such a case, jj would panic because it does not find the commit from which a line originates. This sets the empty commit as carrying the blame for that line.
As described in jj-vcs#5909, in the case where jj was initialized in a shallowly cloned repository which was then unshallow'd, jj does not import the fetched commits that were outside the shallow boundary. However, it does import the ones after the boundary, which after unshallowing do not contain the changes made before the boundary. Therefore, when running annotate in such a case, jj would panic because it does not find the commit from which a line originates. This sets the empty commit as carrying the blame for that line.
As described in jj-vcs#5909, in the case where jj was initialized in a shallowly cloned repository which was then unshallow'd, jj does not import the fetched commits that were outside the shallow boundary. However, it does import the ones after the boundary, which after unshallowing do not contain the changes made before the boundary. Therefore, when running annotate in such a case, jj would panic because it does not find the commit from which a line originates. This sets the empty commit as carrying the blame for that line.
As described in #5909, in the case where jj was initialized in a shallowly cloned repository which was then unshallow'd, jj does not import the fetched commits that were outside the shallow boundary. However, it does import the ones after the boundary, which after unshallowing do not contain the changes made before the boundary. Therefore, when running annotate in such a case, jj would panic because it does not find the commit from which a line originates. This sets the empty commit as carrying the blame for that line.
Description
When using jj inside a repo that was cloned with a shallow depth and then unshallow'd, and then running
jj file annotate
, jj will panic because itexpect
's an empty initial commit.Faulty line is here
Steps to Reproduce the Problem
Expected Behavior
The file is annotated.
Actual Behavior
A panic occurs.
Specifications
Darwin excalibur.local 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan 2 20:22:00 PST 2025; root:xnu-11215.81.4~3/RELEASE_X86_64 x86_64
jj 0.26.0
The text was updated successfully, but these errors were encountered: