mirror of
https://github.com/Dasemu/Grove.git
synced 2026-11-26 23:36:11 +00:00
fix(core): protect ignored files and fix backup ref namespaces
Archive no longer deletes worktrees holding ignored files, fast-forward and snapshot apply decline instead of overwriting ignored files, backup refs use per-kind namespaces, add refuses sparse checkouts. Regression tests and docs updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
938604193e
commit
126acb4b57
6 files changed
+277
-20
No files matched your search
@@ -195,6 +195,16 @@ fn refuses_unsafe_situations_without_touching_anything() {
|
||||
commit(&g, "a", "1");
|
||||
assert!(refused(migrate(&inside, "m", &inside.join("bk"), "1")).contains("outside"));
|
||||
assert!(inside.join(".git").is_dir());
|
||||
assert!(
|
||||
!inside.join("bk").exists(),
|
||||
"refusal must not create the backup dir"
|
||||
);
|
||||
|
||||
let sparse = base.join("sparse");
|
||||
let g = init(&sparse);
|
||||
commit(&g, "a", "1");
|
||||
g.run(&["config", "core.sparseCheckout", "true"]).unwrap();
|
||||
assert!(refused(migrate(&sparse, "m", &bk, "1")).contains("sparse"));
|
||||
// Subdirectory is not a repo root.
|
||||
fs::create_dir(inside.join("sub")).unwrap();
|
||||
assert!(refused(migrate(&inside.join("sub"), "m", &bk, "1")).contains("plain clone"));
|
||||
|
||||
Reference in new issue
Block a user