Re: GSoC draft proposal: Line-level history browser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 23, 2010, Bo Yang wrote:
> On Tue, Mar 23, 2010 at 7:22 PM, Jakub Narebski <jnareb@xxxxxxxxx> wrote:
> >
> > This would work with the simplest case, but not in more complicated
> > cases, like for example preimage and postimage with different size.
> >
> > Take for example the following chunk (fragment):
> >
> > diff --git a/run-command.c b/run-command.c
> > index 2feb493..3206d61 100644
> > --- a/run-command.c
> > +++ b/run-command.c
> > @@ -67,19 +67,21 @@ static int child_notifier = -1;
> >
> >  static void notify_parent(void)
> >  {
> > -       write(child_notifier, "", 1);
> > +       ssize_t unused;
> > +       unused = write(child_notifier, "", 1);
> >  }
> >
> >  static NORETURN void die_child(const char *err, va_list params)
> >
> > If you follow ssize_t line, it is created.  If you follow line with
> > write, which is 2nd line in postimage, its previous version is 1st
> > line in preimage.
> >
> >
> > Another example would be reordering of lines, or reordering with
> > some change.
> 
> Ah, yes, you are right.
> 
> And now, I really get the difference between the understanding about
> line level browser of us. :) When users want to browsing the history
> of some line or line range, you want to display only the related lines
> to them, but I want to display the minim diff hunk to them. :)
> And I think displaying the minimum diff hunk is sensible and feasible.
> Could you please tell me what do you think about this?

The problem is not what (part of) diff you would display.  The problem
is with following the history (with history simplification).  *After*
displaying diff / chunk / chunk fragment, do we further follow history
of the whole preimage?  Or do we follow history of line pre-change
starting from blamed commit?

If we *don't* follow the history, how line-level browser is different
from (wrapped) git-blame?


Try to come with the result of line-level history for some line in
git sources "by hand": this would help in discussion about what 
line-level history browser should do, and perhaps even be first test
of it (see e.g. tests for git-blame).

-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]