Re: [PATCH v2] difftool: don't overwrite modified files
- From
John Keeping <john@keeping.me.uk>
- Date
- Mar 26, 2013, 21:01 UTC
- Message-ID
- <20130326210141.GL2286@serenity.lan>
- In-Reply-To
- <CAJELnLFxEa6v39ocVD+VLj9b86HhURsnFa+UKc+r3xYPLStSNw@mail.gmail.com>
On Tue, Mar 26, 2013 at 04:52:02PM -0400, Matt McClure wrote:
Show 9 quoted lines
> On Mon, Mar 25, 2013 at 5:44 PM, John Keeping <john@keeping.me.uk> wrote: > > Instead of copying unconditionally when the files differ, create and > > index from the working tree files and only copy the temporary file back > > if it was modified and the working tree file was not. If both files > > have been modified, print a warning and exit with an error. > > When there's a conflict, does difftool save both conflicting files? Or > only the working tree copy? I think it should preserve both copies on > disk.
It preserves both copies - the "clean the temporary directory" step is just skipped.
This isn't ideal since the temporary copy will be under a temporary directory somewhere but is better than the current behaviour. It might be nice to move the temporary file back with an extension so that the files are at least near each other but I don't think that's needed in the first version of this change.