git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Miriam R. <mirucam@gmail.com>
Date
Oct 29, 2019, 20:14 UTC
Message-ID
<CAN7CjDAWvKXOp+z=d8g-7QRBxwSExNCmqnU87fXN_vsDhteOZg@mail.gmail.com>
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ó:
Show 27 quoted lines
>
> 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.
Previous: Junio C Hamano
Message 3 of 3 in “clone: rename static function `dir_exists()`.”
  1. Miriam RubioOct 28, 2019
  2. Junio C HamanoOct 29, 2019
  3. Miriam R.Oct 29, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.