textmate/rmate — pull request #12 by sellmerfud (2013-02-28 03:01:37+00:00)
Title: Copy backup on save

This is a proposed solution to issue #11.

Rather than create a hard link to the original, write to a temp file, then copy the temp file over the original, we copy the original, then write the new file contents directly to the original file. This preserves the files owner and group (and permissions).

This allows using `rmate` to edit files where you are not the owner of the file.