log --follow

John Keeping john at keeping.me.uk
Tue Apr 16 10:48:34 CEST 2013

On Mon, Apr 15, 2013 at 07:30:11PM +0200, René Neumann wrote:
> Am 15.04.2013 14:38, schrieb John Keeping:
> > On Mon, Apr 15, 2013 at 01:51:43PM +0200, René Neumann wrote:
> >> I just noticed that cgit does not show history over renames. Is it
> >> somehow reasonable to add "--follow" by default, or make it an option?
> >> Or are there reasons against it?
> > 
> > I don't think it should be turned on unconditionally, since it does
> > require some more work to generate the log, but I see no reason why we
> > couldn't add an option for it.
> > 
> > The patch below should cause the log to be generated with "--follow",
> > but obviously it needs more work to be turned into a proper patch.  If
> > this is useful I'll try to find some time to do this properly.
> Unfortunately, this does not work. Now, when showing the log of one
> file, it shows the complete history of the repository (where all
> non-corresponding patches are empty).
> I can't explain, why it behaves like that...

Interesting - I didn't test it earlier but I do get the same behaviour
you do.

It seems that passing "--follow" to the rev-parse machinery means that
when we walk the revisions we see every commit, since we must now
examine every commit so that the diff machinery can detect renames in
which we are interested.  This means that we need to do more work when
examining a commit before deciding whether we should print it.

I started looking at this yesterday but need some more time to get my
head around the interactions of the different diff flags.  I should have
some time to dig into this further this evening.

More information about the CGit mailing list