List for cgit developers and users
 help / color / mirror / Atom feed
From: john at keeping.me.uk (John Keeping)
Subject: [PATCH] filter: refactor cgit_new_filter()
Date: Tue, 14 Jan 2014 21:59:40 +0000	[thread overview]
Message-ID: <20140114215940.GC7608@serenity.lan> (raw)
In-Reply-To: <CAHmME9rfDH6cHS8aiuhpN=pykynJNfb2MPHVAN8aoHE7cfq3jw@mail.gmail.com>

On Tue, Jan 14, 2014 at 09:54:21PM +0100, Jason A. Donenfeld wrote:
> On Tue, Jan 14, 2014 at 9:39 PM, John Keeping <john at keeping.me.uk> wrote:
> > I like the simplification, but I'm not sure the result is better.  Even
> > without the rest we should replace the strncmp with prefixcmp though.
> 
> Agreed.
> >
> > There's actually no reason we couldn't mutate "cmd" here, which would
> > simplify it a lot, but I'm not sure we want to remove the const
> > modifiers all the way through.  Then we can just do "*colon = '\0'" and
> > use strcmp.
> 
> IMHO, it's better to keep lookup tables like these in the read-only
> section. Let's keep the constness.

I meant for the input, which is read from the config file.  Just
terminate the user-specified command string at the colon and treat it as
two genuinely separate strings.


      reply	other threads:[~2014-01-14 21:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14 13:00 Jason
2014-01-14 20:39 ` john
2014-01-14 20:54   ` Jason
2014-01-14 21:59     ` john [this message]

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=20140114215940.GC7608@serenity.lan \
    --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).