Skip to content

Reconcile dir_exists() and is_directory() #230

Open
@dscho

Description

@dscho

In https://github.com/git/git/blob/v2.22.0-rc1/builtin/clone.c#L885-L889, there is a function with the short and sweet name dir_exists() (which is the obvious companion to file_exists()). However, it is marked as static, so nobody can use it outside builtin/clone.c.

There is also is_directory() which obviously tries to do the very same, but it uses a name that few developers will think of when they see file_exists() and look for the equivalent function to see whether a given directory exists.

Let's reconcile these, probably by renaming is_directory() to dir_exists() and using it also in builtin/clone.c.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions