git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] streaming conversion API
@ 2011-05-21  6:58 Junio C Hamano
  2011-05-21  6:58 ` [PATCH] convert.h: move declarations for conversion from cache.h Junio C Hamano
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Junio C Hamano @ 2011-05-21  6:58 UTC (permalink / raw)
  To: git

This builds on top of jc/streaming topic, in which I earlier hinted that a
filtering mechanism that does not need to slurp everything in core can
later be plugged into the git_istream API. This topioc does exactly that.

The first patch moves declarations related to conversion from cache.h to
its own convert.h header file, so that new streaming conversion API can be
added to it without bloating cache.h even more.

The second patch defines the streaming filter API, adds a pass-through
"null" filter, plugs the streaming filter API to the git_istream API and
updates the write out codepath to use it.  The design of this API is an
object-oriented one that is similar to the istream API. The user of the
git_istream API first grabs "stream_filter" object based on the path, and
passes that filter object when creating a git_istream. The data read from
the underlying object is fed to the filter, and the output from the filter
is returned to the caller of the read_istream().

The third patch adds a non-guessing LF-to-CRLF streaming filter.

The fourth patch implements the ident filter. As both LF-to-CRLF and ident
filters can be active at the same time, it also introduces the "cascade"
mechanism that takes two filters, plugs one's output to the other's input,
and feeds the former and returns what is read from the latter.

I suspect that "smudge" filter should be relatively easy to add and
combine with the existing filters using the same cascade mechanism,
but I'll leave it as an exercise to interested readers.

Junio C Hamano (4):
  convert.h: move declarations for conversion from cache.h
  Add streaming filter API
  Add LF-to-CRLF streaming conversion
  streaming filter: ident filter and filter cascading

 cache.h     |   38 +------
 convert.c   |  363 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 convert.h   |   65 +++++++++++
 entry.c     |   16 ++-
 streaming.c |  100 ++++++++++++++++-
 streaming.h |    2 +-
 6 files changed, 530 insertions(+), 54 deletions(-)
 create mode 100644 convert.h

-- 
1.7.5.2.369.g8fc017

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

end of thread, other threads:[~2011-05-25  2:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-21  6:58 [PATCH 0/4] streaming conversion API Junio C Hamano
2011-05-21  6:58 ` [PATCH] convert.h: move declarations for conversion from cache.h Junio C Hamano
2011-05-21  6:58 ` [PATCH 2/4] Add streaming filter API Junio C Hamano
2011-05-21  6:58 ` [PATCH 3/4] Add LF-to-CRLF streaming conversion Junio C Hamano
2011-05-21  6:58 ` [PATCH 4/4] streaming filter: ident filter and filter cascading Junio C Hamano
2011-05-21 21:05   ` René Scharfe
2011-05-21 21:25     ` René Scharfe
2011-05-25  1:06       ` Junio C Hamano
2011-05-25  2:18         ` [PATCH] t0021: test application of both crlf and ident Junio C Hamano
2011-05-25  2:23         ` [PATCH v2?] streaming: filter cascading Junio C Hamano
2011-05-21 22:08     ` [PATCH 4/4] streaming filter: ident filter and " René Scharfe
2011-05-22  1:00       ` Junio C Hamano

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