From: Thomas Rast <trast@student.ethz.ch>
To: <git@vger.kernel.org>
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Bo Yang" <struggleyb.nku@gmail.com>,
"Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>,
"Will Palmer" <wmpalmer@gmail.com>
Subject: [PATCH v8 0/5] git log -L
Date: Thu, 28 Feb 2013 17:38:18 +0100 [thread overview]
Message-ID: <cover.1362069310.git.trast@student.ethz.ch> (raw)
Here's another shot :-)
For an instructive example, apply it and run
git log -L:archiver:archive.h
in your git.git.
Last time around, apart from some minor issues, there was one main
point discussed[1]: it should be possible to do the line-log in two
separate steps, one for filtering and one for the diffing.
That would have some really nice advantages, in particular it would
let us generate the diff within the usual diff chain. That way it
would work together with e.g. --word-diff automatically.
However, with the whole diff chain IMHO already being in some
disarray, that's such a far-off goal (and a good example of gsoc scope
creep!) that I can't see myself working on it in the near future
unless someone decides to pay me for working on Git. Meanwhile, this
seems to be the only blocker for the inclusion of a feature for which
all feedback has been "WANT!" since it worked for the first time.
So I'd rather settle for including this slightly hacky version, and
then improving on it incrementally.
There are more things that need to be done: my rewrite for readability
(see [1] again) lost the support for -C and -C -C, so it no longer is
any use with big code moves. The only thing that currently works is
-M, which will track the ranges across a file rename that can be
detected by the diff engine (i.e., it works by letting the diff engine
form a rename filepair).
Changes since v7 include:
- An all-new patch that allows for funcname matching: -L:pattern:file.
I find it makes calling line-log (or blame, for that matter) much
more natural. I'm not exactly married to the syntax; in particular
it feels weird in blame where you have to say 'git blame -L:foo file'.
If you have better ideas, please shout.
- Tests! Yay. Also fixes for bugs found by the tests ;-)
- Dropped the unnecessary patch "Export three functions from diff.c".
Bo Yang (2):
Refactor parse_loc
Export rewrite_parents() for 'log -L'
Thomas Rast (3):
blame: introduce $ as "end of file" in -L syntax
Implement line-history search (git log -L)
log -L: :pattern:file syntax to find by funcname
Documentation/blame-options.txt | 19 +-
Documentation/git-log.txt | 22 +
Documentation/line-range-format.txt | 31 +
Makefile | 2 +
builtin/blame.c | 99 +--
builtin/log.c | 31 +
line-log.c | 1433 +++++++++++++++++++++++++++++++++++
line-log.h | 80 ++
log-tree.c | 4 +
revision.c | 22 +-
revision.h | 16 +-
t/t4211-line-log.sh | 42 +
t/t4211/expect.beginning-of-file | 43 ++
t/t4211/expect.end-of-file | 62 ++
t/t4211/expect.move-support-f | 40 +
t/t4211/expect.simple-f | 59 ++
t/t4211/expect.simple-f-to-main | 100 +++
t/t4211/expect.simple-main | 68 ++
t/t4211/expect.simple-main-to-end | 70 ++
t/t4211/expect.two-ranges | 102 +++
t/t4211/expect.vanishes-early | 39 +
t/t4211/history.export | 330 ++++++++
t/t8003-blame-corner-cases.sh | 6 +
23 files changed, 2601 insertions(+), 119 deletions(-)
create mode 100644 Documentation/line-range-format.txt
create mode 100644 line-log.c
create mode 100644 line-log.h
create mode 100755 t/t4211-line-log.sh
create mode 100644 t/t4211/expect.beginning-of-file
create mode 100644 t/t4211/expect.end-of-file
create mode 100644 t/t4211/expect.move-support-f
create mode 100644 t/t4211/expect.simple-f
create mode 100644 t/t4211/expect.simple-f-to-main
create mode 100644 t/t4211/expect.simple-main
create mode 100644 t/t4211/expect.simple-main-to-end
create mode 100644 t/t4211/expect.two-ranges
create mode 100644 t/t4211/expect.vanishes-early
create mode 100644 t/t4211/history.export
--
1.8.2.rc1.388.g1bd82c8
next reply other threads:[~2013-02-28 16:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 16:38 Thomas Rast [this message]
2013-02-28 16:38 ` [PATCH v8 1/5] Refactor parse_loc Thomas Rast
2013-02-28 17:16 ` Junio C Hamano
2013-02-28 19:24 ` Thomas Rast
2013-02-28 16:38 ` [PATCH v8 2/5] blame: introduce $ as "end of file" in -L syntax Thomas Rast
2013-02-28 17:18 ` Junio C Hamano
2013-03-12 22:34 ` Junio C Hamano
2013-03-13 7:52 ` Thomas Rast
2013-03-13 16:05 ` Junio C Hamano
2013-02-28 16:38 ` [PATCH v8 3/5] Export rewrite_parents() for 'log -L' Thomas Rast
2013-02-28 17:19 ` Junio C Hamano
2013-02-28 16:38 ` [PATCH v8 4/5] Implement line-history search (git log -L) Thomas Rast
2013-02-28 17:51 ` Junio C Hamano
2013-02-28 19:32 ` Thomas Rast
2013-02-28 20:37 ` Junio C Hamano
2013-02-28 21:41 ` Thomas Rast
2013-02-28 22:23 ` Junio C Hamano
2013-03-01 8:49 ` Thomas Rast
2013-03-01 14:59 ` Thomas Rast
2013-02-28 16:38 ` [PATCH v8 5/5] log -L: :pattern:file syntax to find by funcname Thomas Rast
2013-02-28 19:56 ` [PATCH v8 0/5] git log -L 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1362069310.git.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=struggleyb.nku@gmail.com \
--cc=wmpalmer@gmail.com \
--cc=zbyszek@in.waw.pl \
/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).