* [GSoC 2010 Update] Please try the initial version of the line level history browser
@ 2010-06-17 16:05 Bo Yang
2010-06-25 1:45 ` Jonathan Nieder
0 siblings, 1 reply; 2+ messages in thread
From: Bo Yang @ 2010-06-17 16:05 UTC (permalink / raw)
To: git
Cc: Thomas Rast, Junio C Hamano, Jakub Narebski, Johannes Schindelin,
Jonathan Nieder, Jens Lehmann
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [GSoC 2010 Update] Please try the initial version of the line level history browser
2010-06-17 16:05 [GSoC 2010 Update] Please try the initial version of the line level history browser Bo Yang
@ 2010-06-25 1:45 ` Jonathan Nieder
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Nieder @ 2010-06-25 1:45 UTC (permalink / raw)
To: Bo Yang
Cc: git, Thomas Rast, Junio C Hamano, Jakub Narebski,
Johannes Schindelin, Jens Lehmann
Hi Bo,
Bo Yang wrote:
> ssh://repo.or.cz/srv/git/line.git phrase2
For those without ssh access, it seems the place to look is
git://repo.or.cz/line.git diff-range
http://repo.or.cz/r/line.git diff-range
> 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.
Looking forward to it!
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-25 1:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-17 16:05 [GSoC 2010 Update] Please try the initial version of the line level history browser Bo Yang
2010-06-25 1:45 ` Jonathan Nieder
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).