Merge tag 'v2.35.2'

This commit is contained in:
Junio C Hamano
2022-04-11 16:44:45 -07:00
14 changed files with 272 additions and 12 deletions

View File

@ -436,6 +436,18 @@ static inline int git_offset_1st_component(const char *path)
#define is_valid_path(path) 1
#endif
#ifndef is_path_owned_by_current_user
static inline int is_path_owned_by_current_uid(const char *path)
{
struct stat st;
if (lstat(path, &st))
return 0;
return st.st_uid == geteuid();
}
#define is_path_owned_by_current_user is_path_owned_by_current_uid
#endif
#ifndef find_last_dir_sep
static inline char *git_find_last_dir_sep(const char *path)
{