Re: [PATCH v2] mergetools/p4merge: Honor $TMPDIR for the /dev/null placeholder

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Aguilar <davvid@xxxxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]