From: Bo Yang <struggleyb.nku@gmail.com>
To: git@vger.kernel.org
Cc: Thomas Rast <trast@student.ethz.ch>,
Junio C Hamano <gitster@pobox.com>,
Jakub Narebski <jnareb@gmail.com>,
Johannes Schindelin <johannes.schindelin@gmx.de>,
Jonathan Nieder <jrnieder@gmail.com>,
Jens Lehmann <Jens.Lehmann@web.de>
Subject: [GSoC 2010 Update] Please try the initial version of the line level history browser
Date: Fri, 18 Jun 2010 00:05:10 +0800 [thread overview]
Message-ID: <AANLkTimRGZziLnffQXmzYnNhhE3dE_5Hsp1mxAEmBiIk@mail.gmail.com> (raw)
Hi all,
After 3 weeks of heavy development, I have finally made up a
usable version of line level history browser. Thomas and I have try
some use cases with it indeed generate useful output for us. :) So, I
think it is a good chance to let all of the ones who is interested in
this feature have a try with it, and please give me any advice if any.
Generally, the code is located at:
ssh://repo.or.cz/srv/git/line.git phrase2
Yes, this is a tag on 'diff-range' branch, all development is on this
branch and phrase1/phrase2 are tags used for 'public testing' version.
:)
For the feature itself, it supports a command line syntax: git-log
log [rev] -L <s>,<e> -L <s>,<e> <file1> -L <s>,<e> file2. And the
multiple ranges case is not fully tested, but mostly works well.
Here are some interesting cases we have run until now. Generally, the
line level history will show users the complete change story of any
line range.
I usually use it for two purpose:
1. Understand code. Many times, when I want to read/modify some lines
of code, the first thing is to try to find out whether my changes has
been considered by other ones. And viewing the whole history of just
these lines( the function contain these lines) is necessary, so ./git
log -L /try_to_find_renames/,/^}/ tree-diff.c and "git log -L '/int
rev_compare_tree/,/^}/' revision.c" helps. :)
2. Find out some code I have delete. :) yes, sometimes, after some
commits, I find the 3 lines deleted the day before yerstoday may be
better than current one. But I really forget what they exactly are
except I know they have appeared in which function. So, run the line
log to find it like. ./git log -L '/void map_lines/,/^}/' line.c to
find it.
And Thomas give some other interesting usecases.
1. Use "git log -L /common_prefix/,/^}/ dir.c" to replace a series
'git blame; git show' to find what whether the function is buggy.
2. Try 'git log be58e70^ -L /builtin_funcname_pattern/,/^}/ diff.c',
the line level browser will report the 'nontrivial merges' touch the
interesting lines.
So, come on everybody, try it in your way, and tell me your advice,
thanks a lot!
Finally, below are the change summary:
Makefile | 2 +
builtin/log.c | 125 ++++++-
diff.c | 6 +-
diff.h | 22 +
diffcore.h | 3 +
line.c | 1210 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
line.h | 120 ++++++
parse-options.c | 24 +-
parse-options.h | 5 +
revision.c | 16 +-
revision.h | 12 +-
11 files changed, 1534 insertions(+), 11 deletions(-)
And finally, my future plans are:
1. Fix some memory leaks of this verion.
2. Collect advice of this version and improve it.
3. Start to prepare this version to list and submit patches.
--
Regards!
Bo
----------------------------
My blog: http://blog.morebits.org
Why Git: http://www.whygitisbetterthanx.com/
next reply other threads:[~2010-06-17 16:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 16:05 Bo Yang [this message]
2010-06-25 1:45 ` [GSoC 2010 Update] Please try the initial version of the line level history browser Jonathan Nieder
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=AANLkTimRGZziLnffQXmzYnNhhE3dE_5Hsp1mxAEmBiIk@mail.gmail.com \
--to=struggleyb.nku@gmail.com \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jnareb@gmail.com \
--cc=johannes.schindelin@gmx.de \
--cc=jrnieder@gmail.com \
--cc=trast@student.ethz.ch \
/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).