Replies: 2 comments
-
|
About the missing piece: We can find that $ jj log -r :: --limit 1 --patch --git themes/ananke
◆ tsmpzlso [email protected] 2025-03-23 00:07:59 ebde216d
│ Went back to an older ananke version to show 'All Posts' again
│ diff --git a/themes/ananke b/themes/ananke
│ index 8e3303d0a4..3fc0dba401 040000
$ jj log -r :: --limit 1 --patch --git themes/ananke | grep '^. index ' | sed 's/.*\.\.//; s/ .*//'
3fc0dba401So now, if I wasn't so lazy, I could actually write a |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the writeup! I gave it a try and it seems to work. I use colocated repos, both the main repo and the submodule were cloned with What I needed is a way to bring the submodule up to whatever the main repo currently points to. The commit in the submodule that the submodule ref in the main repo currently points to can be extracted with I wrote this zsh function to help me update the submodule: function update-jj-submodule() {
local SUB=$1
local COMMIT=$(git ls-tree --object-only HEAD -- "$SUB")
if [[ -z "$COMMIT" ]]; then
echo "No target commit found for $SUB"
return 1
fi
jj git fetch --repository "$SUB" && \
jj new "$COMMIT" --repository "$SUB"
}Usage is just |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I get it. Submodules support isn't here yet. #5205, #1402, #1403, #1404 and #1405. But in the meantime, using a repo that has/needs submodules is actually possible until "proper" support arrives.
E.g. I have a git repo for my hugo-based home page with a submodule for the theme in themes/ananke. I don't change the theme very often, so I'm be fine with it not being the best experience to use the submodule. E.g. I can live with having to
jj git clonethe submodule myself and checkout the right version.I tried that:
And as far as I can see, it works "fine" enough for me. Yes, if I make changes to the theme (which I don't) I wont see them. Yes, I need to manually see and/or modify any submodule configuration using git.
But it doesn't preclude me from using
jj. Just saying.The main missing thing: Is there a way to see from
jjthat I need version3fc0dbaofthemes/ananke? I can see thepathandurlfrom.gitmodules, but not the version. Because then I could write ajj-submodule-init-update.pyscript 🙂.Are there any problems with this that I've overlooked?
Beta Was this translation helpful? Give feedback.
All reactions