@@ -9,6 +9,7 @@ pub mod git {
9
9
10
10
const GIT_SIGN_COMMITS : & str = "commit.gpgsign" ;
11
11
const GITBUTLER_SIGN_COMMITS : & str = "gitbutler.signCommits" ;
12
+ const GITBUTLER_GERRIT_MODE : & str = "gitbutler.gerritMode" ;
12
13
const SIGNING_KEY : & str = "user.signingKey" ;
13
14
const SIGNING_FORMAT : & str = "gpg.format" ;
14
15
const GPG_PROGRAM : & str = "gpg.program" ;
@@ -25,6 +26,7 @@ pub mod git {
25
26
pub struct GitConfigSettings {
26
27
#[ serde( rename = "signCommits" ) ]
27
28
pub gitbutler_sign_commits : Option < bool > ,
29
+ pub gitbutler_gerrit_mode : Option < bool > ,
28
30
pub signing_key : Option < BStringForFrontend > ,
29
31
pub signing_format : Option < BStringForFrontend > ,
30
32
pub gpg_program : Option < BStringForFrontend > ,
@@ -35,6 +37,7 @@ pub mod git {
35
37
fn from (
36
38
crate :: GitConfigSettings {
37
39
gitbutler_sign_commits,
40
+ gitbutler_gerrit_mode,
38
41
signing_key,
39
42
signing_format,
40
43
gpg_program,
@@ -43,6 +46,7 @@ pub mod git {
43
46
) -> Self {
44
47
GitConfigSettings {
45
48
gitbutler_sign_commits,
49
+ gitbutler_gerrit_mode,
46
50
signing_key : signing_key. map ( Into :: into) ,
47
51
signing_format : signing_format. map ( Into :: into) ,
48
52
gpg_program : gpg_program
@@ -57,6 +61,7 @@ pub mod git {
57
61
fn from (
58
62
GitConfigSettings {
59
63
gitbutler_sign_commits,
64
+ gitbutler_gerrit_mode,
60
65
signing_key,
61
66
signing_format,
62
67
gpg_program,
@@ -65,6 +70,7 @@ pub mod git {
65
70
) -> Self {
66
71
crate :: GitConfigSettings {
67
72
gitbutler_sign_commits,
73
+ gitbutler_gerrit_mode,
68
74
signing_key : signing_key. map ( Into :: into) ,
69
75
signing_format : signing_format. map ( Into :: into) ,
70
76
gpg_program : gpg_program. map ( Into :: into) ,
@@ -89,6 +95,8 @@ pub mod git {
89
95
/// * `commit.gpgsign` which is otherwise valid.
90
96
/// * otherwise it defaults to `false` just like Git would.
91
97
pub gitbutler_sign_commits : Option < bool > ,
98
+ /// If `true`, GitButler will create ChangeId trailers and will push references in the Gerrit way
99
+ pub gitbutler_gerrit_mode : Option < bool > ,
92
100
/// `user.signingKey`.
93
101
pub signing_key : Option < BString > ,
94
102
/// `gpg.format`
@@ -108,12 +116,14 @@ pub mod git {
108
116
. boolean ( GITBUTLER_SIGN_COMMITS )
109
117
. or_else ( || config. boolean ( GIT_SIGN_COMMITS ) )
110
118
. or ( Some ( false ) ) ;
119
+ let gitbutler_gerrit_mode = config. boolean ( GITBUTLER_GERRIT_MODE ) . or ( Some ( false ) ) ;
111
120
let signing_key = config. string ( SIGNING_KEY ) . map ( Cow :: into_owned) ;
112
121
let signing_format = config. string ( SIGNING_FORMAT ) . map ( Cow :: into_owned) ;
113
122
let gpg_program = config. trusted_program ( GPG_PROGRAM ) . map ( Cow :: into_owned) ;
114
123
let gpg_ssh_program = config. trusted_program ( GPG_SSH_PROGRAM ) . map ( Cow :: into_owned) ;
115
124
Ok ( GitConfigSettings {
116
125
gitbutler_sign_commits,
126
+ gitbutler_gerrit_mode,
117
127
signing_key,
118
128
signing_format,
119
129
gpg_program,
0 commit comments