git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 0/5] git log -L, all new and shiny
@ 2012-06-07 10:23 Thomas Rast
  2012-06-07 10:23 ` [PATCH v7 1/5] Refactor parse_loc Thomas Rast
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Thomas Rast @ 2012-06-07 10:23 UTC (permalink / raw)
  To: git; +Cc: Bo Yang

I too thought it would never happen -- but then again this is still
not ready, I'm just trying to give it some exposure.

My mail archive says we were at v6 last time, but this is a rewrite
rather than a reroll.  In efforts to make the code understandable, I
tried to compose it of little functions that do little operations on
little data structures, to at least some success.

If you just want to dive in, patch it into your git or pull from

  git://github.com/trast/git.git line-log-WIP

and then try something like

  git log -L '/^int main/,/^}/':git.c
  git log --graph -L '/^static void sha1_object/,/^}/':builtin/index-pack.c 681b07de11

The TODO list:

* I dropped the tests for now, so we need new ones.

* A good split of the main patch would be nice :-)

* Much of the code leaks memory like a sieve because I was lazy.  It's
  workable on the git repository, but eats a few hundred MB for simple
  tasks even there.

* Missing features:
  - detect/filter merges at the hunk level
    (and ideally show a combined diff for the nontrivial ones)
  - -M and -C support
  - ...?

There's also a longer-term wishlist hinted at in the commit message of
the main patch: the diff machinery currently makes no provisions for
chaining its various bells and whistles.  As the most obvious example,
it is not possible to run a word diff over the result of 'log -L'.
Changes in this direction would probably also make the implementation
of 'log -L' fit nicely in there somewhere.


Bo Yang (3):
  Refactor parse_loc
  Export three functions from diff.c
  Export rewrite_parents() for 'log -L'

Thomas Rast (2):
  blame: introduce $ as "end of file" in -L syntax
  Implement line-history search (git log -L)

 Documentation/blame-options.txt     |   19 +-
 Documentation/git-log.txt           |   22 +
 Documentation/line-range-format.txt |   24 +
 Makefile                            |    2 +
 builtin/blame.c                     |   99 +--
 builtin/log.c                       |   53 ++
 diff.c                              |    6 +-
 diff.h                              |   17 +
 line.c                              | 1245 +++++++++++++++++++++++++++++++++++
 line.h                              |   79 +++
 log-tree.c                          |    3 +
 revision.c                          |   22 +-
 revision.h                          |   16 +-
 t/t8003-blame-corner-cases.sh       |    6 +
 14 files changed, 1491 insertions(+), 122 deletions(-)
 create mode 100644 Documentation/line-range-format.txt
 create mode 100644 line.c
 create mode 100644 line.h

-- 
1.7.11.rc1.243.gbf4713c

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

end of thread, other threads:[~2012-06-19 10:33 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-07 10:23 [PATCH v7 0/5] git log -L, all new and shiny Thomas Rast
2012-06-07 10:23 ` [PATCH v7 1/5] Refactor parse_loc Thomas Rast
2012-06-07 10:23 ` [PATCH v7 2/5] blame: introduce $ as "end of file" in -L syntax Thomas Rast
2012-06-07 17:23   ` Junio C Hamano
2012-06-07 17:44     ` Thomas Rast
2012-06-07 10:23 ` [PATCH v7 3/5] Export three functions from diff.c Thomas Rast
2012-06-07 17:44   ` Junio C Hamano
2012-06-07 10:23 ` [PATCH v7 4/5] Export rewrite_parents() for 'log -L' Thomas Rast
2012-06-07 10:23 ` [PATCH v7 5/5] Implement line-history search (git log -L) Thomas Rast
2012-06-07 17:42   ` Junio C Hamano
2012-06-07 17:52     ` Thomas Rast
2012-06-10  9:38   ` Zbigniew Jędrzejewski-Szmek
2012-06-15  4:40 ` [PATCH v7 0/5] git log -L, all new and shiny Junio C Hamano
2012-06-15 13:29   ` Thomas Rast
2012-06-15 15:23     ` Junio C Hamano
2012-06-16  6:01       ` Junio C Hamano
2012-06-19 10:11         ` Thomas Rast
2012-06-19 10:33           ` 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).