Check whether a path component corresponds to a .git$SUFFIX
file.
As some filesystems do special things to filenames when
writing files to disk, you cannot always do a plain string
comparison to verify whether a file name matches an expected
path or not. This function can do the comparison for you,
depending on the filesystem you're on.
@param path the path component to check
@param pathlen the length of path that is to be checked
@param gitfile which file to check against
@param fs which filesystem-specific checks to use
@return 0 in case the file does not match, a positive value if
it does; -1 in case of an error
Check whether a path component corresponds to a .git$SUFFIX file.
As some filesystems do special things to filenames when writing files to disk, you cannot always do a plain string comparison to verify whether a file name matches an expected path or not. This function can do the comparison for you, depending on the filesystem you're on.
@param path the path component to check @param pathlen the length of path that is to be checked @param gitfile which file to check against @param fs which filesystem-specific checks to use @return 0 in case the file does not match, a positive value if it does; -1 in case of an error