]> git.proxmox.com Git - libgit2.git/commitdiff
Style: Do not use (C99) // comments
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>
Tue, 1 Jun 2010 18:41:55 +0000 (19:41 +0100)
committerAndreas Ericsson <ae@op5.se>
Wed, 2 Jun 2010 09:18:56 +0000 (11:18 +0200)
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Andreas Ericsson <ae@op5.se>
src/commit.c
src/revobject.c
src/revwalk.c
tests/t0401-parse.c
tests/t0403-lists.c
tests/t0501-walk.c

index 9fcf811e00fa469688943a9152c16d4ee90fb9a9..eda57c53e981161ad7cb25103fbccb31661181e5 100644 (file)
@@ -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;
 
index caa749d19261a3d284833bad6d8344bf33ba6e7a..32d5e64646c0c3a5229e2008e21a45a741e197f4 100644 (file)
@@ -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;
index 2a6d97c7907f685ae4b18d31d2ef6ec7099298f6..5d7f65df66f2bc9f3581ecb1a7932b31b8c98aa1 100644 (file)
@@ -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;
 }
index 763dd65d1e7ca14658649d7c4d1cc1e4bfd2c671..770de6abbf0bb31fb200f0ea0f86ba2cdafda441 100644 (file)
@@ -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\
index f971ce419affdcf8545527ed3e55e6310ab8731f..dd1a5b5b3b7a1e3abd956a0808675001ee06347e 100644 (file)
@@ -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();
 
index 755a4f75d2184b2ad4ef107932c86c7eecd0806d..065d464e42f271efe08daf3f5b69dbe266266880 100644 (file)
@@ -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};