David Aguilar <dav...@gmail.com> 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?
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to