From: Junio C Hamano Date: Fri, 21 Dec 2012 16:08:47 GMT Subject: Re: [PATCH v2] mergetools/p4merge: Honor $TMPDIR for the /dev/null placeholder Message-ID: <7v4njf2xrk.fsf@alter.siamese.dyndns.org> In-Reply-To: <1356073023-15376-1-git-send-email-davvid@gmail.com> David Aguilar writes: > Use $TMPDIR when creating the /dev/null placeholder for p4merge. > This keeps it out of the current directory. The usual $REMOTE "this is theirs" and $LOCAL "this is ours" are still created in the current directory, no? It is unclear why this "this side does not exist" case wants to be outside of the current directory in the first place. In other words, "This keeps it out of the current directory" only explains what this patch changes, without explaining why it is a good thing to do in the first place. > +create_empty_file () { > + empty_file="${TMPDIR:-/tmp}/git-difftool-p4merge-empty-file.$$" > + >"$empty_file" > + > + printf "$empty_file" > +} Assuming that it makes sense to create only the "this side doe not exist, and here is a placeholder empty file" in $TMPDIR, I think this is probably sufficient. By the way, who is going to remove this temporary file once the command is done?