tests: fix whitespace in refs/rename.c
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
diff --git a/tests-clar/refs/rename.c b/tests-clar/refs/rename.c
index bfdef15..5c1e8a7 100644
--- a/tests-clar/refs/rename.c
+++ b/tests-clar/refs/rename.c
@@ -19,19 +19,19 @@ static git_repository *g_repo;
void test_refs_rename__initialize(void)
{
- g_repo = cl_git_sandbox_init("testrepo");
+ g_repo = cl_git_sandbox_init("testrepo");
}
void test_refs_rename__cleanup(void)
{
- cl_git_sandbox_cleanup();
+ cl_git_sandbox_cleanup();
}
void test_refs_rename__loose(void)
{
- // rename a loose reference
+ // rename a loose reference
git_reference *looked_up_ref, *another_looked_up_ref;
git_buf temp_path = GIT_BUF_INIT;
const char *new_name = "refs/tags/Nemo/knows/refs.kung-fu";
@@ -72,7 +72,7 @@ void test_refs_rename__loose(void)
void test_refs_rename__packed(void)
{
- // rename a packed reference (should make it loose)
+ // rename a packed reference (should make it loose)
git_reference *looked_up_ref, *another_looked_up_ref;
git_buf temp_path = GIT_BUF_INIT;
const char *brand_new_name = "refs/heads/brand_new_name";
@@ -113,7 +113,7 @@ void test_refs_rename__packed(void)
void test_refs_rename__packed_doesnt_pack_others(void)
{
- // renaming a packed reference does not pack another reference which happens to be in both loose and pack state
+ // renaming a packed reference does not pack another reference which happens to be in both loose and pack state
git_reference *looked_up_ref, *another_looked_up_ref;
git_buf temp_path = GIT_BUF_INIT;
const char *brand_new_name = "refs/heads/brand_new_name";
@@ -154,7 +154,7 @@ void test_refs_rename__packed_doesnt_pack_others(void)
void test_refs_rename__name_collision(void)
{
- // can not rename a reference with the name of an existing reference
+ // can not rename a reference with the name of an existing reference
git_reference *looked_up_ref;
/* An existing reference... */
@@ -173,7 +173,7 @@ void test_refs_rename__name_collision(void)
void test_refs_rename__invalid_name(void)
{
- // can not rename a reference with an invalid name
+ // can not rename a reference with an invalid name
git_reference *looked_up_ref;
/* An existing oid reference... */
@@ -199,7 +199,7 @@ void test_refs_rename__invalid_name(void)
void test_refs_rename__force_loose_packed(void)
{
- // can force-rename a packed reference with the name of an existing loose and packed reference
+ // can force-rename a packed reference with the name of an existing loose and packed reference
git_reference *looked_up_ref;
git_oid oid;
@@ -223,7 +223,7 @@ void test_refs_rename__force_loose_packed(void)
void test_refs_rename__force_loose(void)
{
- // can force-rename a loose reference with the name of an existing loose reference
+ // can force-rename a loose reference with the name of an existing loose reference
git_reference *looked_up_ref;
git_oid oid;
@@ -232,7 +232,7 @@ void test_refs_rename__force_loose(void)
git_oid_cpy(&oid, git_reference_target(looked_up_ref));
/* Can be force-renamed to the name of another existing reference. */
- cl_git_pass(git_reference_rename(looked_up_ref, "refs/heads/test", 1));
+ cl_git_pass(git_reference_rename(looked_up_ref, "refs/heads/test", 1));
git_reference_free(looked_up_ref);
/* Check we actually renamed it */
@@ -250,7 +250,7 @@ void test_refs_rename__force_loose(void)
void test_refs_rename__overwrite(void)
{
- // can not overwrite name of existing reference
+ // can not overwrite name of existing reference
git_reference *ref, *ref_one, *ref_one_new, *ref_two;
git_oid id;
@@ -281,7 +281,7 @@ void test_refs_rename__overwrite(void)
void test_refs_rename__prefix(void)
{
- // can be renamed to a new name prefixed with the old name
+ // can be renamed to a new name prefixed with the old name
git_reference *ref, *ref_two, *looked_up_ref;
git_oid id;
@@ -313,33 +313,33 @@ void test_refs_rename__prefix(void)
void test_refs_rename__move_up(void)
{
- // can move a reference to a upper reference hierarchy
- git_reference *ref, *ref_two, *looked_up_ref;
- git_oid id;
+ // can move a reference to a upper reference hierarchy
+ git_reference *ref, *ref_two, *looked_up_ref;
+ git_oid id;
- cl_git_pass(git_reference_lookup(&ref, g_repo, ref_master_name));
- cl_assert(git_reference_type(ref) & GIT_REF_OID);
+ cl_git_pass(git_reference_lookup(&ref, g_repo, ref_master_name));
+ cl_assert(git_reference_type(ref) & GIT_REF_OID);
- git_oid_cpy(&id, git_reference_target(ref));
+ git_oid_cpy(&id, git_reference_target(ref));
- /* Create loose references */
- cl_git_pass(git_reference_create(&ref_two, g_repo, ref_two_name_new, &id, 0));
- git_reference_free(ref_two);
+ /* Create loose references */
+ cl_git_pass(git_reference_create(&ref_two, g_repo, ref_two_name_new, &id, 0));
+ git_reference_free(ref_two);
- /* An existing reference... */
- cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, ref_two_name_new));
+ /* An existing reference... */
+ cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, ref_two_name_new));
- /* Can be renamed upward the reference tree. */
- cl_git_pass(git_reference_rename(looked_up_ref, ref_two_name, 0));
- git_reference_free(looked_up_ref);
+ /* Can be renamed upward the reference tree. */
+ cl_git_pass(git_reference_rename(looked_up_ref, ref_two_name, 0));
+ git_reference_free(looked_up_ref);
- /* Check we actually renamed it */
- cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, ref_two_name));
- cl_assert_equal_s(looked_up_ref->name, ref_two_name);
- git_reference_free(looked_up_ref);
- cl_git_fail(git_reference_lookup(&looked_up_ref, g_repo, ref_two_name_new));
- git_reference_free(ref);
- git_reference_free(looked_up_ref);
+ /* Check we actually renamed it */
+ cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, ref_two_name));
+ cl_assert_equal_s(looked_up_ref->name, ref_two_name);
+ git_reference_free(looked_up_ref);
+ cl_git_fail(git_reference_lookup(&looked_up_ref, g_repo, ref_two_name_new));
+ git_reference_free(ref);
+ git_reference_free(looked_up_ref);
}
void test_refs_rename__propagate_eexists(void)