Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-06-25 12:56:52 +0300
committerPatrick Steinhardt <ps@pks.im>2018-07-13 09:25:12 +0300
commit9994cd3f0ffcd7b28d26c82ecb6564bc4072dc2a (patch)
treef053f0a7f44be547e208d35447623617dfbd0340 /tests/refs
parentf347a441c81c4e16dd54de07c5070eca8fccd5c8 (diff)
treewide: remove use of C++ style comments
C++ style comment ("//") are not specified by the ISO C90 standard and thus do not conform to it. While libgit2 aims to conform to C90, we did not enforce it until now, which is why quite a lot of these non-conforming comments have snuck into our codebase. Do a tree-wide conversion of all C++ style comments to the supported C style comments to allow us enforcing strict C90 compliance in a later commit.
Diffstat (limited to 'tests/refs')
-rw-r--r--tests/refs/delete.c4
-rw-r--r--tests/refs/list.c2
-rw-r--r--tests/refs/normalize.c11
-rw-r--r--tests/refs/overwrite.c8
-rw-r--r--tests/refs/read.c16
-rw-r--r--tests/refs/reflog/reflog.c8
-rw-r--r--tests/refs/rename.c20
-rw-r--r--tests/refs/setter.c4
8 files changed, 37 insertions, 36 deletions
diff --git a/tests/refs/delete.c b/tests/refs/delete.c
index 8cad31686..4cc78aa9c 100644
--- a/tests/refs/delete.c
+++ b/tests/refs/delete.c
@@ -27,7 +27,7 @@ void test_refs_delete__cleanup(void)
void test_refs_delete__packed_loose(void)
{
- // deleting a ref which is both packed and loose should remove both tracks in the filesystem
+ /* deleting a ref which is both packed and loose should remove both tracks in the filesystem */
git_reference *looked_up_ref, *another_looked_up_ref;
git_buf temp_path = GIT_BUF_INIT;
@@ -57,7 +57,7 @@ void test_refs_delete__packed_loose(void)
void test_refs_delete__packed_only(void)
{
- // can delete a just packed reference
+ /* can delete a just packed reference */
git_reference *ref;
git_refdb *refdb;
git_oid id;
diff --git a/tests/refs/list.c b/tests/refs/list.c
index 97461fd69..3e8c82c94 100644
--- a/tests/refs/list.c
+++ b/tests/refs/list.c
@@ -22,7 +22,7 @@ void test_refs_list__cleanup(void)
void test_refs_list__all(void)
{
- // try to list all the references in our test repo
+ /* try to list all the references in our test repo */
git_strarray ref_list;
cl_git_pass(git_reference_list(&ref_list, g_repo));
diff --git a/tests/refs/normalize.c b/tests/refs/normalize.c
index f9c525edc..c692eda77 100644
--- a/tests/refs/normalize.c
+++ b/tests/refs/normalize.c
@@ -4,7 +4,7 @@
#include "git2/reflog.h"
#include "reflog.h"
-// Helpers
+/* Helpers */
static void ensure_refname_normalized(
unsigned int flags,
const char *input_refname,
@@ -149,7 +149,7 @@ void test_refs_normalize__symbolic(void)
void test_refs_normalize__jgit_suite(void)
{
- // tests borrowed from JGit
+ /* tests borrowed from JGit */
/* EmptyString */
ensure_refname_invalid(
@@ -316,9 +316,10 @@ void test_refs_normalize__jgit_suite(void)
ensure_refname_normalized(
GIT_REF_FORMAT_ALLOW_ONELEVEL, "refs/heads/}", "refs/heads/}");
- // This is valid on UNIX, but not on Windows
- // hence we make in invalid due to non-portability
- //
+ /*
+ * This is valid on UNIX, but not on Windows
+ * hence we make in invalid due to non-portability
+ */
ensure_refname_invalid(
GIT_REF_FORMAT_ALLOW_ONELEVEL, "refs/heads/\\");
diff --git a/tests/refs/overwrite.c b/tests/refs/overwrite.c
index 5aea2a764..2e499b75e 100644
--- a/tests/refs/overwrite.c
+++ b/tests/refs/overwrite.c
@@ -23,7 +23,7 @@ void test_refs_overwrite__cleanup(void)
void test_refs_overwrite__symbolic(void)
{
- // Overwrite an existing symbolic reference
+ /* Overwrite an existing symbolic reference */
git_reference *ref, *branch_ref;
/* The target needds to exist and we need to check the name has changed */
@@ -53,7 +53,7 @@ void test_refs_overwrite__symbolic(void)
void test_refs_overwrite__object_id(void)
{
- // Overwrite an existing object id reference
+ /* Overwrite an existing object id reference */
git_reference *ref;
git_oid id;
@@ -85,7 +85,7 @@ void test_refs_overwrite__object_id(void)
void test_refs_overwrite__object_id_with_symbolic(void)
{
- // Overwrite an existing object id reference with a symbolic one
+ /* Overwrite an existing object id reference with a symbolic one */
git_reference *ref;
git_oid id;
@@ -110,7 +110,7 @@ void test_refs_overwrite__object_id_with_symbolic(void)
void test_refs_overwrite__symbolic_with_object_id(void)
{
- // Overwrite an existing symbolic reference with an object id one
+ /* Overwrite an existing symbolic reference with an object id one */
git_reference *ref;
git_oid id;
diff --git a/tests/refs/read.c b/tests/refs/read.c
index c00b016ee..3c7a0a1bf 100644
--- a/tests/refs/read.c
+++ b/tests/refs/read.c
@@ -28,7 +28,7 @@ void test_refs_read__cleanup(void)
void test_refs_read__loose_tag(void)
{
- // lookup a loose tag reference
+ /* lookup a loose tag reference */
git_reference *reference;
git_object *object;
git_buf ref_name_from_tag_name = GIT_BUF_INIT;
@@ -54,7 +54,7 @@ void test_refs_read__loose_tag(void)
void test_refs_read__nonexisting_tag(void)
{
- // lookup a loose tag reference that doesn't exist
+ /* lookup a loose tag reference that doesn't exist */
git_reference *reference;
cl_git_fail(git_reference_lookup(&reference, g_repo, non_existing_tag_ref_name));
@@ -65,7 +65,7 @@ void test_refs_read__nonexisting_tag(void)
void test_refs_read__symbolic(void)
{
- // lookup a symbolic reference
+ /* lookup a symbolic reference */
git_reference *reference, *resolved_ref;
git_object *object;
git_oid id;
@@ -93,7 +93,7 @@ void test_refs_read__symbolic(void)
void test_refs_read__nested_symbolic(void)
{
- // lookup a nested symbolic reference
+ /* lookup a nested symbolic reference */
git_reference *reference, *resolved_ref;
git_object *object;
git_oid id;
@@ -121,7 +121,7 @@ void test_refs_read__nested_symbolic(void)
void test_refs_read__head_then_master(void)
{
- // lookup the HEAD and resolve the master branch
+ /* lookup the HEAD and resolve the master branch */
git_reference *reference, *resolved_ref, *comp_base_ref;
cl_git_pass(git_reference_lookup(&reference, g_repo, head_tracker_sym_ref_name));
@@ -145,7 +145,7 @@ void test_refs_read__head_then_master(void)
void test_refs_read__master_then_head(void)
{
- // lookup the master branch and then the HEAD
+ /* lookup the master branch and then the HEAD */
git_reference *reference, *master_ref, *resolved_ref;
cl_git_pass(git_reference_lookup(&master_ref, g_repo, current_head_target));
@@ -162,7 +162,7 @@ void test_refs_read__master_then_head(void)
void test_refs_read__packed(void)
{
- // lookup a packed reference
+ /* lookup a packed reference */
git_reference *reference;
git_object *object;
@@ -182,7 +182,7 @@ void test_refs_read__packed(void)
void test_refs_read__loose_first(void)
{
- // assure that a loose reference is looked up before a packed reference
+ /* assure that a loose reference is looked up before a packed reference */
git_reference *reference;
cl_git_pass(git_reference_lookup(&reference, g_repo, packed_head_name));
diff --git a/tests/refs/reflog/reflog.c b/tests/refs/reflog/reflog.c
index a4484631a..ec251da08 100644
--- a/tests/refs/reflog/reflog.c
+++ b/tests/refs/reflog/reflog.c
@@ -11,7 +11,7 @@ static const char *current_master_tip = "a65fedf39aefe402d3bb6e24df4d4f5fe454775
static git_repository *g_repo;
-// helpers
+/* helpers */
static void assert_signature(const git_signature *expected, const git_signature *actual)
{
cl_assert(actual);
@@ -22,15 +22,15 @@ static void assert_signature(const git_signature *expected, const git_signature
}
-// Fixture setup and teardown
+/* Fixture setup and teardown */
void test_refs_reflog_reflog__initialize(void)
{
- g_repo = cl_git_sandbox_init("testrepo.git");
+ g_repo = cl_git_sandbox_init("testrepo.git");
}
void test_refs_reflog_reflog__cleanup(void)
{
- cl_git_sandbox_cleanup();
+ cl_git_sandbox_cleanup();
}
static void assert_appends(const git_signature *committer, const git_oid *oid)
diff --git a/tests/refs/rename.c b/tests/refs/rename.c
index e3e51485e..6ec8f65ea 100644
--- a/tests/refs/rename.c
+++ b/tests/refs/rename.c
@@ -34,7 +34,7 @@ void test_refs_rename__cleanup(void)
void test_refs_rename__loose(void)
{
- // rename a loose reference
+ /* rename a loose reference */
git_reference *looked_up_ref, *new_ref, *another_looked_up_ref;
git_buf temp_path = GIT_BUF_INIT;
const char *new_name = "refs/tags/Nemo/knows/refs.kung-fu";
@@ -76,7 +76,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, *new_ref, *another_looked_up_ref;
git_buf temp_path = GIT_BUF_INIT;
const char *brand_new_name = "refs/heads/brand_new_name";
@@ -118,7 +118,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, *renamed_ref;
git_buf temp_path = GIT_BUF_INIT;
const char *brand_new_name = "refs/heads/brand_new_name";
@@ -160,7 +160,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, *renamed_ref;
/* An existing reference... */
@@ -179,7 +179,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, *renamed_ref;
/* An existing oid reference... */
@@ -205,7 +205,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, *renamed_ref;
git_oid oid;
@@ -230,7 +230,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, *renamed_ref;
git_oid oid;
@@ -258,7 +258,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_refdb *refdb;
git_oid id;
@@ -292,7 +292,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, *renamed_ref;
git_oid id;
@@ -325,7 +325,7 @@ void test_refs_rename__prefix(void)
void test_refs_rename__move_up(void)
{
- // can move a reference to a upper reference hierarchy
+ /* can move a reference to a upper reference hierarchy */
git_reference *ref, *ref_two, *looked_up_ref, *renamed_ref;
git_oid id;
diff --git a/tests/refs/setter.c b/tests/refs/setter.c
index 2b42ff253..03c214618 100644
--- a/tests/refs/setter.c
+++ b/tests/refs/setter.c
@@ -65,7 +65,7 @@ void test_refs_setter__update_symbolic(void)
void test_refs_setter__cant_update_direct_with_symbolic(void)
{
- // Overwrite an existing object id reference with a symbolic one
+ /* Overwrite an existing object id reference with a symbolic one */
git_reference *ref, *new;
git_oid id;
@@ -80,7 +80,7 @@ void test_refs_setter__cant_update_direct_with_symbolic(void)
void test_refs_setter__cant_update_symbolic_with_direct(void)
{
- // Overwrite an existing symbolic reference with an object id one
+ /* Overwrite an existing symbolic reference with an object id one */
git_reference *ref, *new;
git_oid id;