Re: [Outreachy] [PATCH] clone: rename static function `dir_exists()`.

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

 



Great! Thank you, Junio!

El mar., 29 oct. 2019 a las 4:03, Junio C Hamano (<gitster@xxxxxxxxx>) escribió:
>
> Miriam Rubio <mirucam@xxxxxxxxx> writes:
>
> > builtin/clone.c has a static function dir_exists() that
> > checks if a given path exists on the filesystem.  It returns
> > true (and it is correct for it to return true) when the
> > given path exists as a non-directory (e.g. a regular file).
> >
> > This is confusing.  What the caller wants to check, and what
> > this function wants to return, is if the path exists, so
> > rename it to path_exists().
> >
> > Signed-off-by: Miriam Rubio <mirucam@xxxxxxxxx>
> > ---
> >  builtin/clone.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
>
> With a narrowed scope, the patch and its explanation are both
> perfect ;-)
>
> Now, with this localized change behind us, we may want to consider
> what to do with file_exists(path) that does not ensure the path is a
> file.  It would be a separate topic, and it is OK for the result
> after such consideration to be "let's not go further for now".  It
> also is OK for it to be "I am interested in digging further", too.
>
> Thanks.  Will queue.




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

  Powered by Linux