mxcl/homebrew — pull request #12898 by mistydemeo (2012-06-17 23:24:09+00:00)
Title: Add --force option to `brew link`

re: #11811, the first commit here adds a `--force` option to `brew link`. This will cause homebrew to delete any conflicting files in the PREFIX before symlinking, similar to the old, destructive `brew link` behaviour. It also adds a new `--dry-run`/`-n` option, similar to `git clean`, which lists the files `--force` would delete without making any changes to the filesystem.

The second commit adds a new `ARGV.dryrun?` helper method, since the option was already being checked for manually in another command, and migrates all usages over to it.