git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: <git@vger.kernel.org>
Cc: Bo Yang <struggleyb.nku@gmail.com>
Subject: [PATCH v7 0/5] git log -L, all new and shiny
Date: Thu, 7 Jun 2012 12:23:24 +0200	[thread overview]
Message-ID: <cover.1339063659.git.trast@student.ethz.ch> (raw)

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

             reply	other threads:[~2012-06-07 10:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07 10:23 Thomas Rast [this message]
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

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1339063659.git.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=git@vger.kernel.org \
    --cc=struggleyb.nku@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).