summaryrefslogtreecommitdiff
path: root/tests/stash
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-11-28 14:26:57 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2018-12-01 11:54:57 +0000
commit168fe39bea3368972a8b1a33d5908e73bc790c18 (patch)
treec6d07340e2d8d2d66091c44c7763f3e1823acca2 /tests/stash
parent18e71e6d597abe6c7feb666429c921bd19dc0ba8 (diff)
downloadlibgit2-168fe39bea3368972a8b1a33d5908e73bc790c18.tar.gz
object_type: use new enumeration namesethomson/index_fixes
Use the new object_type enumeration names within the codebase.
Diffstat (limited to 'tests/stash')
-rw-r--r--tests/stash/save.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/stash/save.c b/tests/stash/save.c
index eaa72a89e..c38ef8274 100644
--- a/tests/stash/save.c
+++ b/tests/stash/save.c
@@ -9,7 +9,7 @@ static git_oid stash_tip_oid;
/*
* Friendly reminder, in order to ease the reading of the following tests:
*
- * "stash" points to the worktree commit
+ * "stash" points to the worktree commit
* "stash^1" points to the base commit (HEAD when the stash was created)
* "stash^2" points to the index commit
* "stash^3" points to the untracked commit
@@ -35,7 +35,7 @@ void test_stash_save__cleanup(void)
cl_fixture_cleanup("sorry-it-is-a-non-bare-only-party");
}
-static void assert_object_oid(const char* revision, const char* expected_oid, git_otype type)
+static void assert_object_oid(const char* revision, const char* expected_oid, git_object_t type)
{
int result;
git_object *obj;
@@ -55,7 +55,7 @@ static void assert_object_oid(const char* revision, const char* expected_oid, gi
static void assert_blob_oid(const char* revision, const char* expected_oid)
{
- assert_object_oid(revision, expected_oid, GIT_OBJ_BLOB);
+ assert_object_oid(revision, expected_oid, GIT_OBJECT_BLOB);
}
void test_stash_save__does_not_keep_index_by_default(void)
@@ -212,7 +212,7 @@ void test_stash_save__untracked_regression(void)
cl_git_pass(git_repository_head(&head, repo));
- cl_git_pass(git_reference_peel((git_object **)&head_commit, head, GIT_OBJ_COMMIT));
+ cl_git_pass(git_reference_peel((git_object **)&head_commit, head, GIT_OBJECT_COMMIT));
opts.checkout_strategy = GIT_CHECKOUT_FORCE;
@@ -275,12 +275,12 @@ void test_stash_save__can_stash_against_a_detached_head(void)
void test_stash_save__stashing_updates_the_reflog(void)
{
- assert_object_oid("refs/stash@{0}", NULL, GIT_OBJ_COMMIT);
+ assert_object_oid("refs/stash@{0}", NULL, GIT_OBJECT_COMMIT);
cl_git_pass(git_stash_save(&stash_tip_oid, repo, signature, NULL, GIT_STASH_DEFAULT));
- assert_object_oid("refs/stash@{0}", git_oid_tostr_s(&stash_tip_oid), GIT_OBJ_COMMIT);
- assert_object_oid("refs/stash@{1}", NULL, GIT_OBJ_COMMIT);
+ assert_object_oid("refs/stash@{0}", git_oid_tostr_s(&stash_tip_oid), GIT_OBJECT_COMMIT);
+ assert_object_oid("refs/stash@{1}", NULL, GIT_OBJECT_COMMIT);
}
void test_stash_save__cannot_stash_when_there_are_no_local_change(void)
@@ -386,7 +386,7 @@ void test_stash_save__can_stage_normal_then_stage_untracked(void)
assert_blob_oid("stash@{1}^2:who", "cc628ccd10742baea8241c5924df992b5c019f71"); /* world */
assert_blob_oid("stash@{1}^2:when", NULL);
- assert_object_oid("stash@{1}^3", NULL, GIT_OBJ_COMMIT);
+ assert_object_oid("stash@{1}^3", NULL, GIT_OBJECT_COMMIT);
assert_blob_oid("stash@{0}^0:what", "ce013625030ba8dba906f756967f9e9ca394464a"); /* hello */
assert_blob_oid("stash@{0}^0:how", "ac790413e2d7a26c3767e78c57bb28716686eebc"); /* small */
@@ -415,7 +415,7 @@ void test_stash_save__including_untracked_without_any_untracked_file_creates_an_
cl_git_pass(git_stash_save(&stash_tip_oid, repo, signature, NULL, GIT_STASH_INCLUDE_UNTRACKED));
- assert_object_oid("stash^3^{tree}", EMPTY_TREE, GIT_OBJ_TREE);
+ assert_object_oid("stash^3^{tree}", EMPTY_TREE, GIT_OBJECT_TREE);
}
void test_stash_save__ignored_directory(void)