Merge tag 'v2.35.2'
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user