Reject secret mv onto the same secret under another name (closes #78) #81

Merged
clawbot merged 1 commits from issue-78-case-alias-move into next 2026-10-04 07:42:12 +02:00
1 Commits
Author SHA1 Message Date
sneak 97d039f1a4 Reject secret mv onto the same secret under another name (closes #78)
check / check (push) Waiting to run
On a case-insensitive filesystem (the macOS default) "Foo" and "foo" name
one secret, so `secret mv --force Foo foo` removed the destination, which
was the source, and lost the secret with every version. Between vaults the
copy replaced the source, and removing the source then removed the copy.

Both kinds of move now compare the two secret directories with
os.SameFile before changing anything and reject the move if they are one,
with or without --force. The tests give one secret two names with
symbolic links on the real filesystem.

Model: opus-5-5
2026-10-04 05:09:04 +00:00