yoshiyoshifujii / gitbucket-commitgraphs-plugin

28 stars 12 forks source link

Use of jgit instead of git command line #4

Open McFoggy opened 9 years ago

McFoggy commented 9 years ago

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.

yoshiyoshifujii commented 8 years ago

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

FlYnN91 commented 8 years ago

+1 on this.

ghost commented 8 years ago

+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 commented 8 years ago

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?