test: pin the edit symlink refusal, AppendRegular's clean check and Remove (#188)
Review round 1 on PR #189 (three tests stayed green with their guard removed): - TestEditRefusesANoteBehindASymlinkedDirectory had no .git, so Edit refused "not the sync source" before any path check. It now has one, plus a positive control. - AppendRegular's unclean-path case was refused by a final symlink, not cleanRel. New test where ".." after a symlinked dir resolves to a real file, for AppendRegular and PutRegular. - brainfs.Remove had no test; new one (refuses behind a symlinked dir, removes a final link but never its target, positive control). Also: promote/reject create with O_EXCL (new brainfs.CreateRegular), so a note that appears after the collision check is never overwritten; gofmt fixes in provenance.go and wiki/log.go; dead wingDir and putBrainFile removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -101,7 +101,6 @@ func Apply(content string, s Stamp) (string, error) {
|
||||
return out, nil
|
||||
}
|
||||
|
||||
|
||||
// plainGroups keeps the provably plain key groups of a frontmatter block.
|
||||
func plainGroups(block string) string {
|
||||
lines := strings.Split(strings.TrimSuffix(block, "\n"), "\n")
|
||||
|
||||
Reference in New Issue
Block a user