git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: GSoC draft proposal: Line-level history browser

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 20, 2010, 13:36 UTC
Message-ID
<alpine.DEB.1.00.1003201432410.7596@pacific.mpi-cbg.de>
In-Reply-To
<41f08ee11003200610n2c7c9684l6ca200cffdfdb434@mail.gmail.com>
Hi,
[please do not cull the Cc: list]
On Sat, 20 Mar 2010, Bo Yang wrote:
Show 7 quoted lines
> I (Johannes) wrote:
>
> > I think that that might be good for starters, but one could imagine 
> > that an integration into "git log" might be even better, so that gitk 
> > can use this without any further changes.
> 
> So, I think add some new options to 'git log' is preferred.

Yes, I think that this should be the target for the user interface. However, the logic should be different enough to merit a completely new file for the code (think "git add --interactive").

Show 21 quoted lines
> > It would be good if the code looked harder after failing with the 
> > simple strategy, such as looking for code removed in other files, 
> > fuzzy matching (optional), and looking for code duplication (i.e. 
> > literal copying, or slightly modified copying).
> >
> > The fuzzy matching might be necessary to catch things like a Java 
> > class moving from one file into another (and changing its name): the 
> > first line changes, but not completely.
> 
> That's really a good idea.
> So, when the program reach the end of the history thread of some
> changes of line range, it should not stop immediately. It then should
> make a harder code search and try to find whether the new add lines of
> code is moved to there or just copied from other place to there. And
> these kind of search should use fuzzy matching instead of exact string
> matching.
> 
> But notice that, detect code movement in one commit is much efficient
> than detecting code copy. So, I think we should add an option to
> control whether we detect such kind of code copy. By default, we
> detect code move but not code copy. How do you think about this?

Yes, it is much more difficult, and it is more expensive. So: there are several steps in the project (you could also call them "milestones"), and fuzzy matching end lines would come later than simple code movement. And still later than code movement between files.

Show 13 quoted lines
> > Just have a look at the word-level diff (--color-words):
> >
> > http://repo.or.cz/w/git/dscho.git/blob/bc1ed6aafd9ee4937559535c66c8bddf1864bec6:/diff.c#l382
> >
> > You will see that there is a function fn_out_diff_words_aux(), which 
> > is passed to xdi_diff_outf(). That latter function calls xdiff such 
> > that the former function receives a complete line at a time. And this 
> > is what I would suggest doing in the line-level log, too.
> 
> I have look over the function fn_out_diff_words_aux, this function parse 
> each line of a memory diff. We can use it to detect the diff hunk head 
> and find the line change. If you think the performance is acceptable, I 
> think using this callback mechanism is all right.

Yes, I think that the performance is alright there, it works well enough for --color-words.

Thanks, Dscho

Previous: Bo YangNext: Bo Yang
Message 6 of 54 in “GSoC draft proposal: Line-level history browser”
  1. Bo YangMar 20, 2010
  2. Johannes SchindelinMar 20, 2010
  3. Bo YangMar 20, 2010
  4. Junio C HamanoMar 20, 2010
  5. Bo YangMar 21, 2010
  6. Johannes SchindelinMar 20, 2010
  7. Bo YangMar 21, 2010
  8. Alex RiesenMar 20, 2010
  9. Junio C HamanoMar 20, 2010
  10. Bo YangMar 21, 2010
  11. A Large Angry SCMMar 20, 2010
  12. Bo YangMar 21, 2010
  13. A Large Angry SCMMar 21, 2010
  14. Bo YangMar 22, 2010
  15. Junio C HamanoMar 22, 2010
  16. Bo YangMar 22, 2010
  17. Junio C HamanoMar 22, 2010
  18. Bo YangMar 22, 2010
  19. Junio C HamanoMar 22, 2010
  20. Bo YangMar 22, 2010
  21. Jonathan NiederMar 22, 2010
  22. Bo YangMar 23, 2010
  23. Jakub NarebskiMar 23, 2010
  24. Bo YangMar 23, 2010
  25. Jakub NarebskiMar 23, 2010
  26. Bo YangMar 23, 2010
  27. Jakub NarebskiMar 23, 2010
  28. Bo YangMar 23, 2010
  29. Jonathan NiederMar 23, 2010
  30. A Large Angry SCMMar 23, 2010
  31. Bo YangMar 24, 2010
  32. Peter KjellerstedtMar 23, 2010
  33. Jonathan NiederMar 23, 2010
  34. Bo YangMar 24, 2010
  35. Jonathan NiederMar 24, 2010
  36. Alex RiesenMar 22, 2010
  37. Johannes SchindelinMar 22, 2010
  38. Bo YangMar 22, 2010
  39. Jakub NarebskiMar 22, 2010
  40. Johannes SchindelinMar 22, 2010
  41. Sverre RabbelierMar 22, 2010
  42. Johannes SchindelinMar 22, 2010
  43. Sverre RabbelierMar 22, 2010
  44. Johannes SchindelinMar 22, 2010
  45. Bo YangMar 23, 2010
  46. Bo YangMar 23, 2010
  47. Bo YangMar 29, 2010
  48. Thomas RastMar 29, 2010
  49. Bo YangMar 30, 2010
  50. Michael J GruberMar 30, 2010
  51. Michael J GruberMar 30, 2010
  52. Bo YangMar 30, 2010
  53. Jakub NarebskiMar 30, 2010
  54. Bo YangMar 30, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.