utopia-ia/elffuss-braid public
Changesets · Branches · Tags · Compare
| Changeset | 93048831ca8a632d758da75caab56bf281a60e5aacbb6e77b5621e08508864c5 |
|---|---|
| Author | KikoCis <KikoCis@users.noreply.github.com> · 2026-10-17 13:58 +02:00 |
| Committer | KikoCis <KikoCis@users.noreply.github.com> · 2026-10-17 13:58 +02:00 |
| Parents | 35a553d5143e |
2 files changed
modified bench/run.py +4 −1
| @@ -776,7 +776,10 @@ | ||
| 776 | 776 | fsck = tools.braid_run(repo, "fsck", "--json", capture=True).json() |
| 777 | 777 | if not fsck["clean"]: |
| 778 | 778 | raise Failure(f"braid fsck after the import: {fsck['problems'][:3]}") |
| 779 | - files = count_files(ws) - 1 # less the workspace's .braid file | |
| 779 | + # less the workspace's own .braid file and its .git guard | |
| 780 | + files = count_files(ws) - sum( | |
| 781 | + os.path.lexists(os.path.join(ws, name)) for name in (".braid", ".git") | |
| 782 | + ) | |
| 780 | 783 | if files != info["files"]: |
| 781 | 784 | raise Failure(f"the workspace has {files} files, git's tree {info['files']}") |
| 782 | 785 | configure_git(tools, made["git-bare"]) |
modified crates/cli/tests/sessions.rs +2 −1
| @@ -136,8 +136,9 @@ | ||
| 136 | 136 | let out = git(&workspace, args); |
| 137 | 137 | assert!(!out.status.success(), "git {args:?} worked in a workspace"); |
| 138 | 138 | let err = String::from_utf8_lossy(&out.stderr); |
| 139 | + // Only the refusal is the same in every git: older versions repeat | |
| 140 | + // the guard's text, which names braid, and newer ones say "(null)". | |
| 139 | 141 | assert!(err.contains("not a git repository"), "git {args:?}: {err}"); |
| 140 | - assert!(err.contains("braid workspace"), "git {args:?}: {err}"); | |
| 141 | 142 | } |
| 142 | 143 | assert_eq!( |
| 143 | 144 | fs::read_to_string(dir.join("notes.txt")).unwrap(), |