Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog

All notable changes to this project are documented here.

## Unreleased

### Changed

- README documents exit-code semantics, rename refusal, and security expectations.
- Worker pool, streaming rewrites, and other reliability/performance fixes are landing via open PRs—see GitHub issues #7–#23.

### Fixed

- Non-fatal walk errors are collected and surfaced as a non-zero exit code (#6).
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ Renaming ./alphabet to betabet
```

* Files with matching contents in the current working directory are atomically rewritten.
* Files and directories are renamed.
* Files and directories are renamed (depth-first: contents before names).
* Searches are performed recursively from the current working directory.
* Searches are case sensitive.
* `.git/` directories are skipped.
* Binary files are ignored.
* Binary-looking files are ignored.
* Rename is refused when the destination path already exists.
* Errors are logged per file or directory; the process exits with status 1 if any operation failed.

## Security model

`find-replace` is intended for batch find/replace in a working tree you control. It performs atomic rewrites via a temporary file in the same directory and does not overwrite an existing destination during rename. Run it only in trusted directories; symlink hardening is not a current guarantee—see open issues for planned improvements.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid promising overwrite protection for renames

This overstates the rename safety guarantee: RenameFile checks os.Stat(newPath) and then calls os.Rename(f.Path, newPath), so if a destination is created between those calls (or for cases like a broken symlink that os.Stat treats as not existing), POSIX rename can still clobber it. In any directory with concurrent file activity, the README now tells users the tool “does not overwrite an existing destination” even though the implementation only best-effort refuses destinations observed before the rename.

Useful? React with 👍 / 👎.


## Goal

Expand Down