From: John Keeping Date: Tue, 26 Mar 2013 19:34:19 GMT Subject: Re: [PATCH v2] difftool: don't overwrite modified files Message-ID: <20130326193419.GK2286@serenity.lan> In-Reply-To: <5151702C.9060502@viscovery.net> On Tue, Mar 26, 2013 at 10:53:48AM +0100, Johannes Sixt wrote: > Am 3/26/2013 10:31, schrieb John Keeping: > > On Tue, Mar 26, 2013 at 09:38:42AM +0100, Johannes Sixt wrote: > > The last test does result in /tmp filling up with temporary directories > > though, it would be good if the test could clean up after itself. The > > best I can come up with is adding something like this immediately after > > running difftool but I'm not entirely happy with the ".." in the > > argument to rm: > > > > test_when_finished rm -rf "$(cat tmpdir)/.." > > Wrap the test in > > ( > TMPDIR=$TRASH_DIRECTORY && > export TMPDIR && > ... > ) > > It works for me. Nice. I've reviewed File::Spec and it looks like that TMPDIR takes priority on every operating system except VMS, and I don't think we care about that. Unless Junio says otherwise, I'll hold off sending this until difftool calms down a bit to avoid too many conflicted merges.