about summary refs log tree commit diff
path: root/cgit.c
diff options
context:
space:
mode:
authorLukas Fleischer <cgit@cryptocrack.de>2014-01-10 14:55:31 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2014-01-10 17:06:24 +0100
commitc96becc1e5ebff9e6609e61e11e80debcb3a778c (patch)
tree94ed1213cfc1100edf5800a540f3394f1be47f52 /cgit.c
parentcgit.c: Use "else" for mutually exclusive branches (diff)
downloadcgit-pink-c96becc1e5ebff9e6609e61e11e80debcb3a778c.tar.gz
cgit-pink-c96becc1e5ebff9e6609e61e11e80debcb3a778c.zip
cgit.c: Fix comment on bit mask hack
* 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>
Diffstat (limited to '')
-rw-r--r--cgit.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/cgit.c b/cgit.c
index f4262d8..d74b0f3 100644
--- 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++;
ht'> 2018-09-14Apply consecutive formatting codes at onceJune McEnroe Fixes the failing splits test. 2018-09-14Add tests for formatParseJune McEnroe With one currently failing so you know they're worth it. 2018-09-13Preview with nick in input windowJune McEnroe 2018-09-13Never send PRIVMSG to TagStatus or TagVerboseJune McEnroe 2018-09-13Move color selection to format.cJune McEnroe 2018-09-13Fix len for format->split at end of stringJune McEnroe 2018-09-13Avoid uninitialized x in uiReadJune McEnroe 2018-09-13Add IRCDefault to colors enumJune McEnroe 2018-09-13Return a format->split even at the end of the stringJune McEnroe 2018-09-13Fix weird tab-complete after commaJune McEnroe I have no idea why I did this. 2018-09-13Rewrite UI againJune McEnroe The persistent topic is gone and the status line is now at the top. The status formatting still needs to be reworked. I also want to try showing the nick in the input window so it really looks like your next message. 2018-09-12Add note about C-oJune McEnroe Why are there so few well usable ctrl key bindings? 2018-09-12Use formatParse split to position input cursorJune McEnroe 2018-09-12Factor out IRC formatting parsingJune McEnroe 2018-09-11Add /help equivalent to /manJune McEnroe 2018-09-11Don't render every PM as a pingJune McEnroe 2018-09-11Add urlOpenMatchJune McEnroe 2018-09-10Depend on man.sh for chroot.tar targetJune McEnroe 2018-09-10Set LESSSECURE=1 in man.shJune McEnroe Ridiculous. 2018-09-10Add /man commandJune McEnroe 2018-09-10Install man page in chrootJune McEnroe 2018-09-10Install man pageJune McEnroe 2018-09-10Split keys into subsections and document colorsJune McEnroe 2018-09-10Add "blank" lines to chatte.1June McEnroe 2018-09-10Document key bindings in chatte.1June McEnroe 2018-09-08Document slash commands in chatte.1June McEnroe