Style: Do not use (C99) // comments Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
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 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
diff --git a/src/commit.c b/src/commit.c
index 9fcf811..eda57c5 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -115,7 +115,7 @@ git_commit *git_commit_lookup(git_revpool *pool, const git_oid *id)
memset(commit, 0x0, sizeof(git_commit));
- // Initialize parent object
+ /* Initialize parent object */
git_oid_cpy(&commit->object.id, id);
commit->object.pool = pool;
@@ -200,7 +200,7 @@ int git_commit__parse_buffer(git_commit *commit, void *data, size_t len)
if ((parent = git_commit_lookup(commit->object.pool, &oid)) == NULL)
return GIT_ENOTFOUND;
- // Inherit uninteresting flag
+ /* Inherit uninteresting flag */
if (commit->uninteresting)
parent->uninteresting = 1;
diff --git a/src/revobject.c b/src/revobject.c
index caa749d..32d5e64 100644
--- a/src/revobject.c
+++ b/src/revobject.c
@@ -45,7 +45,7 @@ git_revpool_table *git_revpool_table_create(unsigned int min_size)
if (table == NULL)
return NULL;
- // round up size to closest power of 2
+ /* round up size to closest power of 2 */
min_size--;
min_size |= min_size >> 1;
min_size |= min_size >> 2;
diff --git a/src/revwalk.c b/src/revwalk.c
index 2a6d97c..5d7f65d 100644
--- a/src/revwalk.c
+++ b/src/revwalk.c
@@ -76,9 +76,11 @@ int gitrp_push(git_revpool *pool, git_commit *commit)
return error;
}
- // Sanity check: make sure that if the commit
- // has been manually marked as uninteresting,
- // all the parent commits are too.
+ /*
+ * Sanity check: make sure that if the commit
+ * has been manually marked as uninteresting,
+ * all the parent commits are too.
+ */
if (commit->uninteresting)
git_commit__mark_uninteresting(commit);
@@ -160,7 +162,7 @@ git_commit *gitrp_next(git_revpool *pool)
return next;
}
- // No commits left to iterate
+ /* No commits left to iterate */
gitrp_reset(pool);
return NULL;
}
diff --git a/tests/t0401-parse.c b/tests/t0401-parse.c
index 763dd65..770de6a 100644
--- a/tests/t0401-parse.c
+++ b/tests/t0401-parse.c
@@ -7,13 +7,13 @@
static char *test_commits_broken[] = {
- // empty commit
+ /* empty commit */
"",
- // random garbage
+ /* random garbage */
"asd97sa9du902e9a0jdsuusad09as9du098709aweu8987sd\n",
- // broken endlines 1
+ /* broken endlines 1 */
"tree f6c0dad3c7b3481caa9d73db21f91964894a945b\r\n\
parent 05452d6349abcd67aa396dfb28660d765d8b2a36\r\n\
author Vicent Marti <tanoku@gmail.com> 1273848544 +0200\r\n\
@@ -21,7 +21,7 @@ committer Vicent Marti <tanoku@gmail.com> 1273848544 +0200\r\n\
\r\n\
a test commit with broken endlines\r\n",
- // broken endlines 2
+ /* broken endlines 2 */
"tree f6c0dad3c7b3481caa9d73db21f91964894a945b\
parent 05452d6349abcd67aa396dfb28660d765d8b2a36\
author Vicent Marti <tanoku@gmail.com> 1273848544 +0200\
@@ -29,7 +29,7 @@ committer Vicent Marti <tanoku@gmail.com> 1273848544 +0200\
\
another test commit with broken endlines",
- // starting endlines
+ /* starting endlines */
"\ntree f6c0dad3c7b3481caa9d73db21f91964894a945b\n\
parent 05452d6349abcd67aa396dfb28660d765d8b2a36\n\
author Vicent Marti <tanoku@gmail.com> 1273848544 +0200\n\
@@ -37,24 +37,26 @@ committer Vicent Marti <tanoku@gmail.com> 1273848544 +0200\n\
\n\
a test commit with a starting endline\n",
- // corrupted commit 1
+ /* corrupted commit 1 */
"tree f6c0dad3c7b3481caa9d73db21f91964894a945b\n\
parent 05452d6349abcd67aa396df",
- // corrupted commit 2
+ /* corrupted commit 2 */
"tree f6c0dad3c7b3481caa9d73db21f91964894a945b\n\
parent ",
- // corrupted commit 3
+ /* corrupted commit 3 */
"tree f6c0dad3c7b3481caa9d73db21f91964894a945b\n\
parent ",
- // corrupted commit 4
+ /* corrupted commit 4 */
"tree f6c0dad3c7b3481caa9d73db21f91964894a945b\n\
par",
- // FIXME: duplicated parents?
- // It this supposed to pass?
+ /*
+ * FIXME: duplicated parents?
+ * It this supposed to pass?
+ */
/*
"tree f6c0dad3c7b3481caa9d73db21f91964894a945b\n\
parent 05452d6349abcd67aa396dfb28660d765d8b2a36\n\
@@ -68,20 +70,20 @@ duplicated parent",
static char *test_commits_working[] = {
- // simple commit with no message
+ /* simple commit with no message */
"tree f6c0dad3c7b3481caa9d73db21f91964894a945b\n\
author Vicent Marti <tanoku@gmail.com> 1273848544 +0200\n\
committer Vicent Marti <tanoku@gmail.com> 1273848544 +0200\n\
\n",
- // simple commit, no parent
+ /* simple commit, no parent */
"tree f6c0dad3c7b3481caa9d73db21f91964894a945b\n\
author Vicent Marti <tanoku@gmail.com> 1273848544 +0200\n\
committer Vicent Marti <tanoku@gmail.com> 1273848544 +0200\n\
\n\
a simple commit which works\n",
- // simple commit, 1 parents
+ /* simple commit, 1 parents */
"tree f6c0dad3c7b3481caa9d73db21f91964894a945b\n\
parent 05452d6349abcd67aa396dfb28660d765d8b2a36\n\
author Vicent Marti <tanoku@gmail.com> 1273848544 +0200\n\
diff --git a/tests/t0403-lists.c b/tests/t0403-lists.c
index f971ce4..dd1a5b5 100644
--- a/tests/t0403-lists.c
+++ b/tests/t0403-lists.c
@@ -24,7 +24,7 @@ BEGIN_TEST(list_timesort_test)
for (t = 0; t < 20; ++t) {
const int test_size = rand() % 500 + 500;
- // Purely random sorting test
+ /* Purely random sorting test */
for (i = 0; i < test_size; ++i) {
git_commit *c = git__malloc(sizeof(git_commit));
c->commit_time = (time_t)rand();
@@ -37,7 +37,7 @@ BEGIN_TEST(list_timesort_test)
git_commit_list_clear(&list, 1);
}
- // Try to sort list with all dates equal.
+ /* Try to sort list with all dates equal. */
for (i = 0; i < 200; ++i) {
git_commit *c = git__malloc(sizeof(git_commit));
c->commit_time = 0;
@@ -49,7 +49,7 @@ BEGIN_TEST(list_timesort_test)
TEST_SORTED();
git_commit_list_clear(&list, 1);
- // Try to sort empty list
+ /* Try to sort empty list */
git_commit_list_timesort(&list);
TEST_SORTED();
diff --git a/tests/t0501-walk.c b/tests/t0501-walk.c
index 755a4f7..065d464 100644
--- a/tests/t0501-walk.c
+++ b/tests/t0501-walk.c
@@ -21,12 +21,12 @@ static const char *odb_dir = "../t0501-objects";
static const char *commit_head = "a4a7dce85cf63874e984719f4fdd239f5145052f";
static const char *commit_ids[] = {
- "a4a7dce85cf63874e984719f4fdd239f5145052f", // 0
- "9fd738e8f7967c078dceed8190330fc8648ee56a", // 1
- "4a202b346bb0fb0db7eff3cffeb3c70babbd2045", // 2
- "c47800c7266a2be04c571c04d5a6614691ea99bd", // 3
- "8496071c1b46c854b31185ea97743be6a8774479", // 4
- "5b5b025afb0b4c913b4c338a42934a3863bf3644", // 5
+ "a4a7dce85cf63874e984719f4fdd239f5145052f", /* 0 */
+ "9fd738e8f7967c078dceed8190330fc8648ee56a", /* 1 */
+ "4a202b346bb0fb0db7eff3cffeb3c70babbd2045", /* 2 */
+ "c47800c7266a2be04c571c04d5a6614691ea99bd", /* 3 */
+ "8496071c1b46c854b31185ea97743be6a8774479", /* 4 */
+ "5b5b025afb0b4c913b4c338a42934a3863bf3644", /* 5 */
};
static const int commit_sorting_topo[] = {0, 1, 2, 3, 5, 4};