pub fn parse_branches(text: &str) -> Vec<BranchRef>Expand description
Parse the format above: five NUL-terminated fields per branch, one branch per line.
use majordomus_cli::worktree::state::parse_branches;
let b = parse_branches("feature/x\0abc\0origin/feature/x\0ahead 2, behind 1\0/a/foo-wt/feature/x\0\nmain\0def\0\0\0/a/foo\0\n");
assert_eq!(b.len(), 2);
let u = b[0].upstream.as_ref().unwrap();
assert_eq!((u.ahead, u.behind, u.gone), (Some(2), Some(1), false));
assert!(b[1].upstream.is_none());