Skip to content
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

Submodule regression from 0.22 -> 0.23 #5013

Closed
ChrisPenner opened this issue Dec 3, 2024 · 2 comments
Closed

Submodule regression from 0.22 -> 0.23 #5013

ChrisPenner opened this issue Dec 3, 2024 · 2 comments

Comments

@ChrisPenner
Copy link

Description

Hi folks! I noticed a regression recently that's been making it pretty difficult for me to use jj on one of my larger projects so I figured I'd try and narrow it down and get a report together.

jj has always happily ignored my git submodules and let me manage them using git without much trouble, however there's been a change between version 0.22.0 (which works well) to 0.23.0 which causes issues.

In 0.23.0 jj seems to start tracking submodules if you have a commit which mentions them, then it causes all sorts of problems where jj thinks you've got changes in your submodules, but you can't actually commit or ignore them no matter what you do. I'm having trouble pinning down how I got into that state, but I was able to reproduce the following workflow:

Steps to Reproduce the Problem

The following steps fail on 0.23.0, but work fine on 0.22.0

  1. `git clone "git@github.com:unisoncomputing/share-api"
  2. git submodule update --init --recursive
  3. jj git init --colocate
  4. cd unison && git checkout cp/batched-diffs (any branch other than trunk will do, we just need a change to commit)
    5.cd .. && git add -A && git commit -m "commit submodule"
  5. jj status
  6. jj abandon -r @-
Abandoned commit rzpynzsp a56fbf3d update submodule
Rebased 1 descendant commits onto parents of abandoned commits
Internal error: Failed to check out commit cee899b78e7d4a477c866636ae250ea692c585e7
Caused by:
1: Failed to remove file /Users/cpenner/dev/share-api/unison
2: Operation not permitted (os error 1)

$ jj status
Error: The working copy is stale (not updated since operation 853877ccb943).
Hint: Run `jj workspace update-stale` to update it.
See https://martinvonz.github.io/jj/latest/working-copy/#stale-working-copy for more information.

Expected Behavior

jj version 0.22.0 demonstrates the correct behaviour, it simply ignores the submodule and doesn't error or track files within it.

Actual Behavior

jj version 0.23.0 sometimes fails to check out changes which alter submodules, and sometimes tracks changes within them if there are git commits which have updated the submodule.

Specifications

  • Platform: OSX
  • Version: 0.23.0

Thanks for all your work folks, love the tool!

@yuja
Copy link
Contributor

yuja commented Dec 3, 2024

Sorry, there was a bug in submodule handling. The fix will be included in the next release.
#4825

@yuja yuja closed this as completed Dec 3, 2024
@ChrisPenner
Copy link
Author

Great thanks!! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants