Skip to content

JGIT blame doesn't emit revision/author for some lines causing a mismatch for all following lines #4707

Open
@aerofeev2k

Description

@aerofeev2k

I'm seeing an issue with a mismatch between second/third columns (containing revision number and author) in OpenGrok Annotate page and actual file contents for GIT files.

It appears that for some commits revision/author entries are not emitted, meaning that:

  1. Though the file's line is output, the corresponding revision/author is not;
  2. As a result, for the rest of the file revision/author are shifted up by one line;
  3. At the end of the Annotate page the last line of the file has empty revision/author.

"git blame" has no problem showing correct info.

It seems that the two things that are different about the commits that cause the mismatch is a space in the developer's name and a different timezone (as reported by "git blame"). Some commits are just trivial single line insertions.

Has anything like that been seen and perhaps fixed in the last year? Is it possible to switch OpenGrok to using "git blame" command rather than JGIT for generating Annotate pages through some config setting?

I tried replacing org.eclipse.jgit-5.12.0.202106070339-r.jar with a newer 7.0 version, but that didn't really make any difference.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions