jj is a really nice version control system that uses git in the background.
As such it can fetch data from radicle, but jj git push fails.
jj complains about “unfamiliar output”. It apparently tries to parse
some output returned by git push procelain and git-remote-rad seems to be
messing up the expected output.
This is what a sequence of commands that create a “refs/patches” “branch” in
jj and then pushes that into the git remote that lives in origin:
> jj bookmark create refs/patches -r @
Created 1 bookmarks pointing to zvrlxmuo db790658 refs/patches | Add `rad-patch` config snippet into `README.md`
> jj git push -r @ --remote origin --allow-new
Changes to push to origin:
Add bookmark refs/patches to db7906586ea8
Error: Git process failed: Git push output unfamiliar:
Error: External command exited with 1
The code producing this output is in the parse_ref_pushes in
git_subprocess.rs in the jj repo (https://github.com/jj-vcs/jj.git for your
convenience).
It apparently expects the output to start with b"To ". The docs to the
function says this to the expected format:
// git-push porcelain has the following format (per line)
// `<flag>\t<from>:<to>\t<summary> (<reason>)`
//
// <flag> is one of:
// ' ' for a successfully pushed fast-forward;
// + for a successful forced update
// - for a successfully deleted ref
// * for a successfully pushed new ref
// ! for a ref that was rejected or failed to push; and
// = for a ref that was up to date and did not need pushing.
//
// <from>:<to> is the refspec
//
// <summary> is extra info (commit ranges or reason for rejected)
//
// <reason> is a human-readable explanation
fn parse_ref_pushes(stdout: &[u8]) -> Result<GitPushStats, GitSubprocessError> {
if !stdout.starts_with(b"To ") {
return Err(GitSubprocessError::External(format!(
"Git push output unfamiliar:\n{}",
stdout.to_str_lossy()
)));
}
[...]
It would be super cool if jj could be used with radicle… going back to git
is not an option for me at all :-)
Hey! Thanks for opening the issue :) I actually use
jjas well, and maintain theheartwoodrepo! But the difference is that I don’t use thejj gitmechanism. I haven’t taken the time to understand what the benefit is there, could you explain it to me?Regarding being compatible, I get that
jjis being defensive in the expected input, but surely they could change that to something more like:Or something along those lines (no pun intended :P)
It is used as
jj git pushto push your references to server. How do you actually push if you are usingjjto work on heartwood?I use
git push, I don’t need to go throughjjand as far as I can tell I get the same experience. So I don’t know what I’m missing. What isjj gitdoing that’s special?