git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Miriam R." <mirucam@gmail.com>
To: Junio C Hamano <gitster@pobox.com>, git <git@vger.kernel.org>
Subject: Re: [Outreachy] [PATCH] clone: rename static function `dir_exists()`.
Date: Tue, 29 Oct 2019 21:14:20 +0100	[thread overview]
Message-ID: <CAN7CjDAWvKXOp+z=d8g-7QRBxwSExNCmqnU87fXN_vsDhteOZg@mail.gmail.com> (raw)
In-Reply-To: <xmqqimo86yon.fsf@gitster-ct.c.googlers.com>

Great! Thank you, Junio!

El mar., 29 oct. 2019 a las 4:03, Junio C Hamano (<gitster@pobox.com>) escribió:
>
> Miriam Rubio <mirucam@gmail.com> 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@gmail.com>
> > ---
> >  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.

      reply	other threads:[~2019-10-29 20:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 16:55 [Outreachy] [PATCH] clone: rename static function `dir_exists()` Miriam Rubio
2019-10-29  3:03 ` Junio C Hamano
2019-10-29 20:14   ` Miriam R. [this message]

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='CAN7CjDAWvKXOp+z=d8g-7QRBxwSExNCmqnU87fXN_vsDhteOZg@mail.gmail.com' \
    --to=mirucam@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).