List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH v2 0/9] filter framework and lua support: complete
@ 2014-01-13 14:00 Jason
  2014-01-13 14:00 ` [PATCH v2 1/9] filter: add fprintf_filter function Jason
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Jason @ 2014-01-13 14:00 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-01-13 14:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-13 14:00 [PATCH v2 0/9] filter framework and lua support: complete Jason
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

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).