summaryrefslogtreecommitdiffstats
path: root/test/need.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/need.c')
-rw-r--r--test/need.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/test/need.c b/test/need.c
index f831111..013674e 100644
--- a/test/need.c
+++ b/test/need.c
@@ -1,18 +1,13 @@
-/* need.c - What a ref costs beyond what the rule said - which is only ever the case
- * for refs outside refs/heads and refs/tags. There is no second list in the
- * policy that can raise the price of a ref behind the operator's back.
- *
- * Part of the direct suite: this links the library, not the command
- * line. test/run.sh is the other half, and drives the program the way git does.
- */
+// What a ref costs beyond what the rule said - only ever refs outside
+// refs/heads and refs/tags.
#include "test.h"
static void test_need_for(void)
{
char raised[64];
- /* A branch or a tag costs exactly what the rule said: there is no list
- * elsewhere in the file that can raise the price of one. */
+ // A branch or a tag costs exactly what the rule said: there is no list *
+ // elsewhere in the file that can raise the price of one.
CHECK_INT(authz_need_for("refs/heads/dev", LV_WRITE, raised, sizeof(raised)),
LV_WRITE);
CHECK_STR(raised, "");
@@ -23,8 +18,8 @@ static void test_need_for(void)
CHECK_INT(authz_need_for("refs/heads/feature/x", LV_FORCE, raised, sizeof(raised)),
LV_FORCE);
- /* Anything outside refs/heads and refs/tags is for maintainers, whatever a
- * rule appears to grant about it. */
+ // Anything outside refs/heads and refs/tags is for maintainers, whatever a *
+ // rule appears to grant about it.
CHECK_INT(authz_need_for("refs/pull/1/head", LV_WRITE, raised, sizeof(raised)),
LV_ADMIN);
CHECK_STR(raised, "neither a branch nor a tag");
@@ -34,7 +29,7 @@ static void test_need_for(void)
LV_ADMIN);
CHECK_INT(authz_need_for("refs/notes/x", LV_ADMIN, raised, sizeof(raised)),
LV_ADMIN);
- CHECK_STR(raised, ""); /* admin is already the top */
+ CHECK_STR(raised, ""); // admin is already the top
}
int main(void)