From: cgit at cryptocrack.de (Lukas Fleischer)
Subject: [PATCH 2/2] cgit.c: Fix comment on bit mask hack
Date: Fri, 10 Jan 2014 14:55:31 +0100 [thread overview]
Message-ID: <1389362131-13202-2-git-send-email-cgit@cryptocrack.de> (raw)
In-Reply-To: <1389362131-13202-1-git-send-email-cgit@cryptocrack.de>
* 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 at cryptocrack.de>
---
cgit.c | 18 ++++++++++--------
1 file 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++;
--
1.8.5.2
next prev parent reply other threads:[~2014-01-10 13:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-10 13:55 [PATCH 1/2] cgit.c: Use "else" for mutually exclusive branches cgit
2014-01-10 13:55 ` cgit [this message]
2014-01-10 16:06 ` [PATCH 2/2] cgit.c: Fix comment on bit mask hack Jason
2014-01-10 16:05 ` [PATCH 1/2] cgit.c: Use "else" for mutually exclusive branches Jason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1389362131-13202-2-git-send-email-cgit@cryptocrack.de \
--to=cgit@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).