List for cgit developers and users
 help / color / mirror / Atom feed
From: Jason at zx2c4.com (Jason A. Donenfeld)
Subject: [PATCH v2 0/9] filter framework and lua support: complete
Date: Mon, 13 Jan 2014 15:00:21 +0100	[thread overview]
Message-ID: <1389621630-15044-1-git-send-email-Jason@zx2c4.com> (raw)

In this second installment I've squashed things down and cleanly separated
the framework commits from the lua commits. It should be much easier to
comprehend.

The weakest part is still the Makefile changes, which might not be very
portable and could probably be more configurable somehow. If anybody would
like to step in and brush this up, that'd be quite nice. You can base commits
off of jd-jk/filter-infra, and I'll fold it into this series.

The other controversial item is the write() hooking. The reason we do this
instead of replacing the html_raw function is that in various places, such
as lines 82 and 83 of ui-patch.c, we use other facilities for writing to
standard out -- either via stdio (which has its own buffering), or via git,
which also has its own buffering. So, it turned out to be safer to hook
libc's write than to try and monkey patch git itself.

Another comment brought up in v1 was adding a filter_lua.c file. I'd like to
keep things fairly compact for now, partially because I like inline and
static functions, and partially because I don't want to create a filter.h.
Right now despite supporting a scripting language, this is pretty lean; I'd
like for it to remain so. At least for now.

Jason A. Donenfeld (6):
  filter: allow for cleanup hook for filter types
  filter: basic write hooking infrastructure
  filter: add lua support
  filter: return on null filter from open and close
  filter: add support for email filter
  filter: add gravatar scripts

John Keeping (3):
  filter: add fprintf_filter function
  filter: add interface layer
  filter: introduce "filter type" prefix

 cgit.c                     |  15 +-
 cgit.h                     |  18 ++-
 cgit.mk                    |  22 ++-
 cgitrc.5.txt               |  56 +++++++
 filter.c                   | 376 ++++++++++++++++++++++++++++++++++++++++++---
 filters/email-gravatar.lua |  25 +++
 filters/email-gravatar.py  |  33 ++++
 shared.c                   |   1 +
 ui-commit.c                |  22 ++-
 ui-log.c                   |   2 +
 ui-refs.c                  |   9 +-
 ui-repolist.c              |   6 +-
 ui-snapshot.c              |  11 +-
 ui-summary.c               |   8 +-
 ui-tag.c                   |   2 +
 15 files changed, 550 insertions(+), 56 deletions(-)
 create mode 100644 filters/email-gravatar.lua
 create mode 100755 filters/email-gravatar.py

-- 
1.8.5.2



             reply	other threads:[~2014-01-13 14:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13 14:00 Jason [this message]
2014-01-13 14:00 ` [PATCH v2 1/9] filter: add fprintf_filter function Jason
2014-01-13 14:00 ` [PATCH v2 2/9] filter: add interface layer Jason
2014-01-13 14:00 ` [PATCH v2 3/9] filter: introduce "filter type" prefix Jason
2014-01-13 14:00 ` [PATCH v2 4/9] filter: allow for cleanup hook for filter types Jason
2014-01-13 14:00 ` [PATCH v2 5/9] filter: basic write hooking infrastructure Jason
2014-01-13 14:00 ` [PATCH v2 6/9] filter: add lua support Jason
2014-01-13 14:00 ` [PATCH v2 7/9] filter: return on null filter from open and close Jason
2014-01-13 14:00 ` [PATCH v2 8/9] filter: add support for email filter Jason
2014-01-13 14:00 ` [PATCH v2 9/9] filter: add gravatar scripts 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=1389621630-15044-1-git-send-email-Jason@zx2c4.com \
    --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).