Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] difftool: avoid symlinks when reusing worktree files

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:07:06

David Aguilar [off-list ref] writes:
quoted
+	if (-l "$workdir/$file" || ! -e _) {
 		return (0, $null_sha1);
 	}
The "-e _" shorthand caught my eye ~ I didn't know perl could do that!
Nice.

Underline is barely mentioned in perlvar, but it's obvious what
(I think) it means, and since Perl is DWIM, it must be right. ;-)
It is mentioned under -X (i.e. the headline for -f, -e, -d,
... tests) in perlfunc with an interesting example of doing
an explicit stat() first and then running many variants of -X
with _ as the target.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help