diff options
author | Russell Belfer <rb@github.com> | 2012-10-17 14:14:51 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-10-17 14:14:51 -0700 |
commit | 4c47a8bcfe03c42096b74d4af06ab95fb95fd211 (patch) | |
tree | c79eb8290ef110faff68ae2d5746455095508e1e /src/refs.c | |
parent | 6012e86839bbdfc98085662c22f8e34b6f6abefb (diff) | |
parent | 52a61bb8047f431bf363bd9327d0f34884437c83 (diff) | |
download | libgit2-4c47a8bcfe03c42096b74d4af06ab95fb95fd211.tar.gz |
Merge pull request #968 from arrbee/diff-support-typechange
Support TYPECHANGE records in status and adjust checkout accordingly
Diffstat (limited to 'src/refs.c')
-rw-r--r-- | src/refs.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/refs.c b/src/refs.c index 740d99eda..833f2fcc8 100644 --- a/src/refs.c +++ b/src/refs.c @@ -276,14 +276,15 @@ static int loose_write(git_reference *ref) if (git_buf_joinpath(&ref_path, ref->owner->path_repository, ref->name) < 0) return -1; - /* Remove a possibly existing empty directory hierarchy + /* Remove a possibly existing empty directory hierarchy * which name would collide with the reference name */ - if (git_path_isdir(git_buf_cstr(&ref_path)) && - (git_futils_rmdir_r(git_buf_cstr(&ref_path), GIT_DIRREMOVAL_ONLY_EMPTY_DIRS) < 0)) { - git_buf_free(&ref_path); - return -1; - } + if (git_path_isdir(git_buf_cstr(&ref_path)) && + git_futils_rmdir_r(git_buf_cstr(&ref_path), NULL, + GIT_DIRREMOVAL_ONLY_EMPTY_DIRS) < 0) { + git_buf_free(&ref_path); + return -1; + } if (git_filebuf_open(&file, ref_path.ptr, GIT_FILEBUF_FORCE) < 0) { git_buf_free(&ref_path); |