You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Maybe moving it to dir.c and renaming in builtin/clone.c?
I don't think so, as the current dir_exists() does not verify that the path refers to a directory. In essence, it actually does more of a path_exists().
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 tofile_exists()
). However, it is marked asstatic
, so nobody can use it outsidebuiltin/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 seefile_exists()
and look for the equivalent function to see whether a given directory exists.Let's reconcile these, probably by renaming
is_directory()
todir_exists()
and using it also inbuiltin/clone.c
.The text was updated successfully, but these errors were encountered: