Commit 7381c74
Ensure proper footer sorting of footer
When no trailer was configured in git configuration, TRAILERS_BY_REGEX
remained empty. This caused the subsequent match condition to always
evaluate to true, leading to incorrect footer sorting regardless of
their content. To address this issue, the update ensures that when the
configuration is empty, default terms are used to initialize
TRAILERS_BY_REGEX. The sorting mechanism is then adjusted to prioritize
other footers, configured trailers, and the change-id.
Co-authored-by: EricccTaiwan <[email protected]>
Change-Id: I6df5438b7ec6c85f5438f869b44cd14589c03339
Refactor commit trailer regex
Refactor commit trailer regex by renaming default_trailers_by to
DEFAULT_TRAILERS_BY to follow the naming convention for global
variables.Then refine build_commit_trailer_regex by reusing the array.
Co-authored-by: EricccTaiwan <[email protected]>
Change-Id: I7c7e9367f59a6da0ff84605904d08343ad558f421 parent bd9c149 commit 7381c74
1 file changed
+21
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
133 | 143 | | |
134 | 144 | | |
135 | 145 | | |
| |||
145 | 155 | | |
146 | 156 | | |
147 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
148 | 162 | | |
149 | 163 | | |
150 | 164 | | |
151 | 165 | | |
152 | 166 | | |
153 | 167 | | |
| 168 | + | |
154 | 169 | | |
155 | 170 | | |
156 | 171 | | |
| |||
170 | 185 | | |
171 | 186 | | |
172 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
173 | 192 | | |
174 | 193 | | |
175 | 194 | | |
| |||
178 | 197 | | |
179 | 198 | | |
180 | 199 | | |
181 | | - | |
182 | | - | |
| 200 | + | |
183 | 201 | | |
184 | 202 | | |
185 | 203 | | |
| |||
610 | 628 | | |
611 | 629 | | |
612 | 630 | | |
613 | | - | |
| 631 | + | |
614 | 632 | | |
615 | 633 | | |
616 | 634 | | |
| |||
0 commit comments