]> git.proxmox.com Git - libgit2.git/commit
More filemode cleanups for FAT on MacOS
authorRussell Belfer <rb@github.com>
Tue, 8 Oct 2013 19:45:43 +0000 (12:45 -0700)
committerRussell Belfer <rb@github.com>
Tue, 8 Oct 2013 19:45:43 +0000 (12:45 -0700)
commit14997dc5f69e7ceebe502b32087d809a8482bf78
treeff245ed60887dc4eddd3b3ea65e7dd215deeeb62
parent5173ea921d4ccbbe7d61ddce9a0920c2e1c82035
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.
21 files changed:
include/git2/repository.h
src/checkout.c
src/errors.c
src/fileops.c
src/index.c
src/index.h
src/iterator.c
src/path.c
src/path.h
src/repository.c
src/submodule.c
src/win32/posix_w32.c
tests-clar/clar_libgit2.c
tests-clar/diff/patch.c
tests-clar/diff/workdir.c
tests-clar/index/addall.c
tests-clar/index/filemodes.c
tests-clar/refs/unicode.c
tests-clar/submodule/lookup.c
tests-clar/submodule/modify.c
tests-clar/submodule/submodule_helpers.c