fix: serialize absent jj bookmark targets as null

This commit is contained in:
Valdemar Lorenzen
2026-10-15 15:36:48 +02:00
parent c32d4a7590
commit a3be494d57
3 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -1685,7 +1685,7 @@ impl Repository {
}
// Resolve both endpoints from one operation, comparing raw names rather
// than interpreting bookmark names as revsets or splitting on '@'.
let template = r#""[" ++ json(name) ++ "," ++ json(remote) ++ "," ++ json(conflict) ++ "," ++ if(conflict, "null", json(normal_target.commit_id())) ++ "]\n""#;
let template = r#""[" ++ json(name) ++ "," ++ json(remote) ++ "," ++ json(conflict) ++ "," ++ if(normal_target, json(normal_target.commit_id()), "null") ++ "]\n""#;
let output = text(self.jj(
&self.root,
&["bookmark", "list", "--all-remotes", "-T", template],