]> granicus.if.org Git - cgit/commitdiff
cgit.c: Fix comment on bit mask hack
authorLukas Fleischer <cgit@cryptocrack.de>
Fri, 10 Jan 2014 13:55:31 +0000 (14:55 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 10 Jan 2014 16:06:24 +0000 (17:06 +0100)
* Formatting and spelling fixes.

* A bit mask with the size of one byte only allows for storing 8 (not
  255!) different flags.

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
cgit.c

diff --git a/cgit.c b/cgit.c
index f4262d806163bcb2a192f70d4ddf0fd4966f3fbd..d74b0f34605cad72d26d54f2832596ca5f1b7315 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -885,14 +885,16 @@ static void cgit_parse_args(int argc, const char **argv)
                        ctx.qry.ofs = atoi(argv[i] + 6);
                } else if (!prefixcmp(argv[i], "--scan-tree=") ||
                           !prefixcmp(argv[i], "--scan-path=")) {
-                       /* HACK: the global snapshot bitmask defines the
-                        * set of allowed snapshot formats, but the config
-                        * file hasn't been parsed yet so the mask is
-                        * currently 0. By setting all bits high before
-                        * scanning we make sure that any in-repo cgitrc
-                        * snapshot setting is respected by scan_tree().
-                        * BTW: we assume that there'll never be more than
-                        * 255 different snapshot formats supported by cgit...
+                       /*
+                        * HACK: The global snapshot bit mask defines the set
+                        * of allowed snapshot formats, but the config file
+                        * hasn't been parsed yet so the mask is currently 0.
+                        * By setting all bits high before scanning we make
+                        * sure that any in-repo cgitrc snapshot setting is
+                        * respected by scan_tree().
+                        *
+                        * NOTE: We assume that there aren't more than 8
+                        * different snapshot formats supported by cgit...
                         */
                        ctx.cfg.snapshots = 0xFF;
                        scan++;