Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] configure jgit to always include gerrit ChangeId

On Mon, Jul 7, 2014 at 4:06 PM, Thiebaud, Christophe <christophe.thiebaud@xxxxxxx> wrote:

Hi all,

 

We are using the jgitflow maven plugin [1] (version 1.0-m3), which in turn uses jgit (version 3.3.1.201403241930-r) [2].

 

Every commit generated by jgitflow must contain the gerrit changeID [3], as these commits will enter the gerrit dance later.

 

I took a look at jgit source code and noted  that class CommitCommand [4] has insertChangeId attribute, which default to false.

 

Is there any mean to always have this insertChangeId set to true, without changing the jgitflow maven plugin sources ? with some external configuration ?

 

Thanks

Christophe

 

[1] https://bitbucket.org/atlassian/jgit-flow/wiki/Home

[2] https://bitbucket.org/atlassian/jgit-flow/src/f78e05f8167357c7bc38a23db3f8c42a9a7fe475/pom.xml?at=develop

[3] http://gerrit.googlecode.com/svn/documentation/2.0/user-changeid.html

[3] https://github.com/eclipse/jgit/blob/master/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java


there is a custom git configuration option gerrit.createChangeId defined in JGit's ConfigConstants [5]. Though at the moment it's used by
EGit only. So if jgitflow doesn't call the corresponding setter there is no way to configure that at the moment.
I think we could consider teaching CommitCommand to directly respect this configuration option if it's set in git configuration.
Are you interested to contribute this enhancement ?


--
Matthias

Back to the top