]> git.proxmox.com Git - libgit2.git/commit - tests/config/global.c
git_futils_mkdir_*: make a relative-to-base mkdir
authorEdward Thomson <ethomson@microsoft.com>
Wed, 16 Sep 2015 19:07:27 +0000 (15:07 -0400)
committerEdward Thomson <ethomson@edwardthomson.com>
Thu, 17 Sep 2015 14:00:35 +0000 (10:00 -0400)
commitac2fba0ecd68e8eae348dec688cbcd0828432cdf
tree35921227c4eae6e36a65a90e391966319d9676b2
parentadd0378d8eb76cb7fde92bcbed3eb59ee5b8947c
git_futils_mkdir_*: make a relative-to-base mkdir

Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter
assumes that we own everything beneath the base, as if it were
being called with a base of the repository or working directory,
and is tailored towards checkout and ensuring that there is no
bogosity beneath the base that must be cleaned up.

This is (at best) slow and (at worst) unsafe in the larger context
of a filesystem where we do not own things and cannot do things like
unlink symlinks that are in our way.
22 files changed:
src/checkout.c
src/fileops.c
src/fileops.h
src/odb_loose.c
src/refdb_fs.c
src/repository.c
tests/checkout/index.c
tests/config/global.c
tests/core/buffer.c
tests/core/copy.c
tests/core/mkdir.c
tests/core/stat.c
tests/index/tests.c
tests/odb/alternates.c
tests/refs/pack.c
tests/repo/discover.c
tests/repo/init.c
tests/repo/iterator.c
tests/repo/open.c
tests/status/ignore.c
tests/status/worktree.c
tests/submodule/status.c