tests-clar/index/filemodes.c


Log

Author Commit Date CI Message
Russell Belfer 14997dc5 2013-10-08T12:45:43 More filemode cleanups for FAT on MacOS This cleans up some additional issues. The main change is that on a filesystem that doesn't support mode bits, libgit2 will now create new blobs with GIT_FILEMODE_BLOB always instead of being at the mercy to the filesystem driver to report executable or not. This means that if "core.filemode" lies and claims that filemode is not supported, then we will ignore the executable bit from the filesystem. Previously we would have allowed it. This adds an option to the new git_repository_reset_filesystem to recurse through submodules if desired. There may be other types of APIs that would like a "recurse submodules" option, but this one is particularly useful. This also has a number of cleanups, etc., for related things including trying to give better error messages when problems come up from the filesystem. For example, the FAT filesystem driver on MacOS appears to return errno EINVAL if you attempt to write a filename with invalid UTF-8 in it. We try to capture that with a better error message now.
Russell Belfer 5173ea92 2013-10-04T16:32:16 Add git_repository_reset_filesystem and fix tests When a repository is transferred from one file system to another, many of the config settings that represent the properties of the file system may be wrong. This adds a new public API that will refresh the config settings of the repository to account for the change of file system. This doesn't do a full "reinitialize" and operates on a existing git_repository object refreshing the config when done. This commit then makes use of the new API in clar as each test repository is set up. This commit also has a number of other clar test fixes where we were making assumptions about the type of filesystem, either based on outdated config data or based on the OS instead of the FS.
Russell Belfer 634f10f6 2013-09-24T10:11:20 Fix incorrect return code in crlf filter The git_buf_text_gather_stats call returns a boolean indicating if the file looks like binary data. That shouldn't be an error; it should be used to skip CRLF processing though.
Russell Belfer 1323c6d1 2013-03-22T14:27:56 Add cl_repo_set_bool and cleanup tests This adds a helper function for the cases where you want to quickly set a single boolean config value for a repository. This allowed me to remove a lot of code.
Philip Kelley 11d9f6b3 2013-01-27T14:17:07 Vector improvements and their fallout
Edward Thomson 25743bd7 2013-01-12T13:47:56 add an index_remove_bypath that removes conflicts, renamed add_from_workdir to match
Russell Belfer a8122b5d 2012-11-21T15:39:03 Fix warnings on Win64 build
Ben Straub f45d51ff 2012-11-20T19:57:46 API updates for index.h
Edward Thomson f45ec1a0 2012-10-29T20:04:21 index refactoring
nulltoken a7dbac0b 2012-08-17T21:10:32 filemode: deploy enum usage
Russell Belfer da825c92 2012-06-19T14:27:02 Make index add/append support core.filemode flag This fixes git_index_add and git_index_append to behave more like core git, preserving old filemode data in the index when adding and/or appending with core.filemode = false. This also has placeholder support for core.symlinks and core.ignorecase, but those flags are not implemented (well, symlinks has partial support for preserving mode information in the same way that git does, but it isn't tested).