summaryrefslogtreecommitdiff
path: root/src/checkout.c
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-05-06 06:33:02 -0700
committerVicent Martí <vicent@github.com>2013-05-06 06:33:02 -0700
commit450a78bf07b0c255df72279d41e04270e453e2cc (patch)
tree5e7b3485f0de1632948996eee1f2ed45ad7db20a /src/checkout.c
parent0ed3fa8a37f6dc2e59eeabb44e4df7660ee856bf (diff)
parente09d18eed66d0239bea73af51e586f6ae651fe49 (diff)
downloadlibgit2-450a78bf07b0c255df72279d41e04270e453e2cc.tar.gz
Merge pull request #1545 from ethomson/checkout_dirs_in_use
allow checkout to proceed when a dir to be removed is in use (win32)
Diffstat (limited to 'src/checkout.c')
-rw-r--r--src/checkout.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/checkout.c b/src/checkout.c
index 21f32d89a..e9ec2bdab 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -955,6 +955,9 @@ static int checkout_remove_the_old(
uint32_t flg = GIT_RMDIR_EMPTY_PARENTS |
GIT_RMDIR_REMOVE_FILES | GIT_RMDIR_REMOVE_BLOCKERS;
+ if (data->opts.checkout_strategy & GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES)
+ flg |= GIT_RMDIR_SKIP_NONEMPTY;
+
git_buf_truncate(&data->path, data->workdir_len);
git_vector_foreach(&data->diff->deltas, i, delta) {