[PATCH] log: allow users to follow a file

John Keeping john at keeping.me.uk
Fri Apr 19 09:54:37 CEST 2013

On Thu, Apr 18, 2013 at 07:31:55PM +0200, René Neumann wrote:
> Thanks a lot for your patch, it is a huge step in the right direction
> (it is way more involved than I could imagine). One issue remains: It
> still displays empty diffstats (example: see [1]) for the commits
> _before_ the rename, as they are limited to the _new_ name. This might
> even lead to wrong commits if you have a commit "A -> B, C -> A" and are
> looking at the history of the new file A.

Thanks for trying this out.  I need to think about how to do this for a
bit because we'll need to change the links in the log to point to the
correct (pre-rename) file path, but then the "Log" link at the top of
the page will link to the log with that file name and we will only show
the pre-rename commits.

The answer to that should help with the corner case of the rename commit
itself, where we want to show both file paths, but I think it becomes
complicated when there are multiple renames in the history.

I don't really want to introduce two new query parameters, one of them
just so that clicking "Log" does the same as navigating back in the
browser.  Perhaps we should accept that once you click on a pre-rename
commit you are now examining that file path, so clicking "Log" doesn't
show any changes after it has been renamed.

That way we only need a bit of extra state to show the rename commit
itself, and the "follow" flag I'm already introducing should be
sufficient for that.

More information about the CGit mailing list