summaryrefslogtreecommitdiff
path: root/tests/index/tests.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-06-08 19:25:36 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2019-06-16 00:55:14 +0100
commit6574cd00763c57cef39ad3d0a9df323904d37864 (patch)
tree8522b98c50810088dd388ccaecd8cfbed7e9f5b6 /tests/index/tests.c
parent08f392080cfd7e08972820d8147dc06432e7c4bf (diff)
downloadlibgit2-6574cd00763c57cef39ad3d0a9df323904d37864.tar.gz
index: rename `frombuffer` to `from_buffer`
The majority of functions are named `from_something` (with an underscore) instead of `fromsomething`. Update the index functions for consistency with the rest of the library.
Diffstat (limited to 'tests/index/tests.c')
-rw-r--r--tests/index/tests.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/index/tests.c b/tests/index/tests.c
index 7c29ef389..2d2744df1 100644
--- a/tests/index/tests.c
+++ b/tests/index/tests.c
@@ -310,7 +310,7 @@ void test_index_tests__add_frombuffer(void)
memset(&entry, 0x0, sizeof(git_index_entry));
entry.mode = GIT_FILEMODE_BLOB;
entry.path = "test.txt";
- cl_git_pass(git_index_add_frombuffer(index, &entry,
+ cl_git_pass(git_index_add_from_buffer(index, &entry,
content, strlen(content)));
/* Wow... it worked! */
@@ -352,7 +352,7 @@ void test_index_tests__dirty_and_clean(void)
/* Index is dirty after adding an entry */
entry.mode = GIT_FILEMODE_BLOB;
entry.path = "test.txt";
- cl_git_pass(git_index_add_frombuffer(index, &entry, "Hi.\n", 4));
+ cl_git_pass(git_index_add_from_buffer(index, &entry, "Hi.\n", 4));
cl_assert(git_index_entrycount(index) == 1);
cl_assert(git_index_is_dirty(index));
@@ -374,7 +374,7 @@ void test_index_tests__dirty_and_clean(void)
cl_assert(!git_index_is_dirty(index));
/* Index is dirty when we do an unforced read with dirty content */
- cl_git_pass(git_index_add_frombuffer(index, &entry, "Hi.\n", 4));
+ cl_git_pass(git_index_add_from_buffer(index, &entry, "Hi.\n", 4));
cl_assert(git_index_entrycount(index) == 1);
cl_assert(git_index_is_dirty(index));
@@ -402,7 +402,7 @@ void test_index_tests__dirty_fails_optionally(void)
/* Index is dirty after adding an entry */
entry.mode = GIT_FILEMODE_BLOB;
entry.path = "test.txt";
- cl_git_pass(git_index_add_frombuffer(index, &entry, "Hi.\n", 4));
+ cl_git_pass(git_index_add_from_buffer(index, &entry, "Hi.\n", 4));
cl_assert(git_index_is_dirty(index));
cl_git_pass(git_checkout_head(repo, NULL));
@@ -410,7 +410,7 @@ void test_index_tests__dirty_fails_optionally(void)
/* Index is dirty (again) after adding an entry */
entry.mode = GIT_FILEMODE_BLOB;
entry.path = "test.txt";
- cl_git_pass(git_index_add_frombuffer(index, &entry, "Hi.\n", 4));
+ cl_git_pass(git_index_add_from_buffer(index, &entry, "Hi.\n", 4));
cl_assert(git_index_is_dirty(index));
cl_git_pass(git_libgit2_opts(GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY, 1));
@@ -455,7 +455,7 @@ void test_index_tests__add_frombuffer_reset_entry(void)
memset(&entry, 0x0, sizeof(git_index_entry));
entry.mode = GIT_FILEMODE_BLOB;
entry.path = "test.txt";
- cl_git_pass(git_index_add_frombuffer(index, &entry,
+ cl_git_pass(git_index_add_from_buffer(index, &entry,
content, strlen(content)));
/* Wow... it worked! */