Re: [PATCH] gitweb: Use File::Find::find in git_get_projects_list

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

 



Jakub Narebski <jnareb@xxxxxxxxx> writes:

> Not true. Link to directory is both -d $_ and -l $_, so
>
> 	return unless (-d $_ || (-l $_ && -d readlink($_)));
>
> is not needed.

I think you mis-read what I said.  I first wondered why you did
not say "return unless -d _" and wrote (seemingly more
inefficient) "return unless -d $_".  The comment is to clarify
why '$' is needed.

In other words, after this setup:

        $ rm -fr d dl
        $ mkdir d
        $ ln -s d dl

you do not see an output from this:

        $ perl -e 'lstat "dl"; print "is-dir\n" if -d _;'

but you do from this:

        $ perl -e 'lstat "dl"; print "is-dir\n" if -d "dl";'


-
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]