From: Junio C Hamano <gitster@pobox•com>
To: David Aguilar <davvid@gmail•com>
Cc: Ismail Badawi <ismail@badawi•io>,
John Keeping <john@keeping•me.uk>,
Tim Henigan <tim.henigan@gmail•com>,
Git Mailing List <git@vger•kernel.org>
Subject: Re: [PATCH] difftool: avoid symlinks when reusing worktree files
Date: Fri, 30 Oct 2015 09:19:10 -0700 [thread overview]
Message-ID: <xmqqio5omirl.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20151030072857.GA15031@gmail.com> (David Aguilar's message of "Fri, 30 Oct 2015 00:28:57 -0700")
David Aguilar <davvid@gmail•com> writes:
>> + 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.
next prev parent reply other threads:[~2015-10-30 16:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 21:24 [PATCH] difftool: avoid symlinks when reusing worktree files David Aguilar
2015-10-27 22:24 ` Junio C Hamano
2015-10-29 1:55 ` David Aguilar
2015-10-29 17:59 ` Junio C Hamano
2015-10-29 18:19 ` Junio C Hamano
2015-10-30 7:28 ` David Aguilar
2015-10-30 16:19 ` Junio C Hamano [this message]
2015-10-27 22:41 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqio5omirl.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=davvid@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=ismail@badawi$(echo .)io \
--cc=john@keeping$(echo .)me.uk \
--cc=tim.henigan@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox