gitbucket-commitgraphs-plugin icon indicating copy to clipboard operation
gitbucket-commitgraphs-plugin copied to clipboard

Use of jgit instead of git command line

Open McFoggy opened this issue 10 years ago • 4 comments

Isn't it possible to use jgit (already in gitbucket classpath) instead of relying on the external git program and output parsing? This could also enhance performances and influence #3.

McFoggy avatar Oct 14 '15 12:10 McFoggy

Oh... I'm sorry. I didn't notice this issue. I'd like to check it based on your advice.

yoshiyoshifujii avatar Nov 28 '15 07:11 yoshiyoshifujii

+1 on this.

FlYnN91 avatar Dec 15 '15 08:12 FlYnN91

+1

I think #2 also relates to this. I am running gitbucket from dockerfile. Since there is no git CLI program in this docker container (but on host machine), I got same stack trace.

ghost avatar Jan 18 '16 05:01 ghost

I found this is not an easy work as far as I inspected.

jgit does not directly support git log --numstat functionality, it means to show ++/--, it must calculate diff for each commits through ObjectReader with ObjectId.

On the other hand, if we drop ++/-- information, it can be much easier as just using LogCommand to generate Iterator[RevCommit] and group by getAuthorIdent (or getCommiterIdent) and getCommitTime. And this would improve performances as well (because no diff computation occurs).

So I think this is a trade off problem. What do you think?

ghost avatar Jan 21 '16 05:01 ghost