]> git.proxmox.com Git - libgit2.git/blobdiff - tests/repo/discover.c
New upstream version 1.1.0+dfsg.1
[libgit2.git] / tests / repo / discover.c
index eadd055e968a12aaa5c76ec2c4866432c7546187..c026eefc3100366c34c6d2a190b3de6199eb3ef1 100644 (file)
@@ -1,7 +1,7 @@
 #include "clar_libgit2.h"
 
 #include "odb.h"
-#include "fileops.h"
+#include "futils.h"
 #include "repository.h"
 
 #define TEMP_REPO_FOLDER "temprepo/"
@@ -37,8 +37,8 @@ static void ensure_repository_discover(const char *start_path,
 
        cl_assert_equal_s(found_path.ptr, resolved.ptr);
 
-       git_buf_free(&resolved);
-       git_buf_free(&found_path);
+       git_buf_dispose(&resolved);
+       git_buf_dispose(&found_path);
 }
 
 static void write_file(const char *path, const char *content)
@@ -58,7 +58,7 @@ static void write_file(const char *path, const char *content)
        cl_git_pass(error);
 }
 
-//no check is performed on ceiling_dirs length, so be sure it's long enough
+/*no check is performed on ceiling_dirs length, so be sure it's long enough */
 static void append_ceiling_dir(git_buf *ceiling_dirs, const char *path)
 {
        git_buf pretty_path = GIT_BUF_INIT;
@@ -71,7 +71,7 @@ static void append_ceiling_dir(git_buf *ceiling_dirs, const char *path)
 
        git_buf_puts(ceiling_dirs, pretty_path.ptr);
 
-       git_buf_free(&pretty_path);
+       git_buf_dispose(&pretty_path);
        cl_assert(git_buf_oom(ceiling_dirs) == 0);
 }
 
@@ -114,8 +114,8 @@ void test_repo_discover__initialize(void)
 
 void test_repo_discover__cleanup(void)
 {
-       git_buf_free(&discovered);
-       git_buf_free(&ceiling_dirs);
+       git_buf_dispose(&discovered);
+       git_buf_dispose(&ceiling_dirs);
        cl_git_pass(git_futils_rmdir_r(TEMP_REPO_FOLDER, NULL, GIT_RMDIR_REMOVE_FILES));
 }