git-digger 1.2.21 → 1.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,95 +2,73 @@
2
2
  'use strict';
3
3
  //region block: imports
4
4
  var imul = Math.imul;
5
+ var HashSet_init_$Create$ = kotlin_kotlin.$_$.q;
5
6
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m;
6
- var collectionSizeOrDefault = kotlin_kotlin.$_$.i4;
7
+ var Unit_instance = kotlin_kotlin.$_$.k3;
8
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.h4;
7
9
  var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.l;
8
- var Unit_instance = kotlin_kotlin.$_$.l3;
9
- var toSet = kotlin_kotlin.$_$.f7;
10
- var minus = kotlin_kotlin.$_$.z5;
11
- var to = kotlin_kotlin.$_$.id;
12
- var first = kotlin_kotlin.$_$.z4;
13
- var reversed = kotlin_kotlin.$_$.k6;
14
- var emptyList = kotlin_kotlin.$_$.u4;
15
- var addAll = kotlin_kotlin.$_$.z3;
16
- var plus = kotlin_kotlin.$_$.g6;
17
- var lastOrNull = kotlin_kotlin.$_$.n5;
18
- var setOf = kotlin_kotlin.$_$.l6;
19
- var numberRangeToNumber = kotlin_kotlin.$_$.v8;
20
- var slice = kotlin_kotlin.$_$.o6;
21
- var plus_0 = kotlin_kotlin.$_$.e6;
22
- var VOID = kotlin_kotlin.$_$.g;
23
- var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.s;
24
- var Collection = kotlin_kotlin.$_$.n3;
25
- var isInterface = kotlin_kotlin.$_$.q8;
26
- var checkCountOverflow = kotlin_kotlin.$_$.g4;
27
- var max = kotlin_kotlin.$_$.x5;
28
- var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.n1;
29
- var compareTo = kotlin_kotlin.$_$.z7;
30
- var last = kotlin_kotlin.$_$.q5;
31
- var firstOrNull = kotlin_kotlin.$_$.y4;
32
- var emptySet = kotlin_kotlin.$_$.w4;
33
- var plus_1 = kotlin_kotlin.$_$.f6;
34
- var plus_2 = kotlin_kotlin.$_$.d6;
35
- var listOf = kotlin_kotlin.$_$.s5;
36
- var mapCapacity = kotlin_kotlin.$_$.u5;
37
- var coerceAtLeast = kotlin_kotlin.$_$.k9;
38
- var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.r;
39
- var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.o1;
40
- var mutableListOf = kotlin_kotlin.$_$.a6;
41
- var println = kotlin_kotlin.$_$.n7;
42
- var removeLast = kotlin_kotlin.$_$.j6;
43
- var equals = kotlin_kotlin.$_$.a8;
44
- var Pair = kotlin_kotlin.$_$.kc;
45
- var Exception_init_$Create$ = kotlin_kotlin.$_$.c1;
46
- var removeAll = kotlin_kotlin.$_$.h6;
47
- var print = kotlin_kotlin.$_$.p7;
48
- var protoOf = kotlin_kotlin.$_$.c9;
49
- var getStringHashCode = kotlin_kotlin.$_$.f8;
50
- var hashCode = kotlin_kotlin.$_$.g8;
51
- var THROW_CCE = kotlin_kotlin.$_$.nc;
52
- var classMeta = kotlin_kotlin.$_$.y7;
53
- var setMetadataFor = kotlin_kotlin.$_$.d9;
54
- var maxOrNull = kotlin_kotlin.$_$.w5;
10
+ var to = kotlin_kotlin.$_$.dd;
11
+ var firstOrNull = kotlin_kotlin.$_$.x4;
12
+ var Pair = kotlin_kotlin.$_$.fc;
13
+ var listOf = kotlin_kotlin.$_$.r5;
14
+ var checkIndexOverflow = kotlin_kotlin.$_$.g4;
15
+ var getOrNull = kotlin_kotlin.$_$.b5;
16
+ var plus = kotlin_kotlin.$_$.b6;
17
+ var protoOf = kotlin_kotlin.$_$.x8;
18
+ var getStringHashCode = kotlin_kotlin.$_$.a8;
19
+ var hashCode = kotlin_kotlin.$_$.b8;
20
+ var THROW_CCE = kotlin_kotlin.$_$.ic;
21
+ var equals = kotlin_kotlin.$_$.v7;
22
+ var classMeta = kotlin_kotlin.$_$.t7;
23
+ var setMetadataFor = kotlin_kotlin.$_$.y8;
24
+ var lastOrNull = kotlin_kotlin.$_$.m5;
25
+ var maxOrNull = kotlin_kotlin.$_$.v5;
55
26
  var Contribution = kotlin_com_zegreatrob_tools_digger_model.$_$.a;
56
- var listOf_0 = kotlin_kotlin.$_$.t5;
57
- var sorted = kotlin_kotlin.$_$.s6;
58
- var toList = kotlin_kotlin.$_$.a7;
59
- var joinToString = kotlin_kotlin.$_$.h5;
60
- var getOrNull = kotlin_kotlin.$_$.c5;
61
- var take = kotlin_kotlin.$_$.w6;
62
- var split = kotlin_kotlin.$_$.lb;
63
- var charSequenceLength = kotlin_kotlin.$_$.w7;
27
+ var listOf_0 = kotlin_kotlin.$_$.s5;
28
+ var addAll = kotlin_kotlin.$_$.y3;
29
+ var toSet = kotlin_kotlin.$_$.a7;
30
+ var sorted = kotlin_kotlin.$_$.n6;
31
+ var toList = kotlin_kotlin.$_$.v6;
32
+ var joinToString = kotlin_kotlin.$_$.g5;
33
+ var take = kotlin_kotlin.$_$.r6;
34
+ var VOID = kotlin_kotlin.$_$.g;
35
+ var split = kotlin_kotlin.$_$.gb;
36
+ var charSequenceLength = kotlin_kotlin.$_$.r7;
64
37
  var Companion_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.b;
65
- var isCharSequence = kotlin_kotlin.$_$.m8;
66
- var trim = kotlin_kotlin.$_$.yb;
67
- var toString = kotlin_kotlin.$_$.f9;
38
+ var isCharSequence = kotlin_kotlin.$_$.h8;
39
+ var trim = kotlin_kotlin.$_$.tb;
40
+ var toString = kotlin_kotlin.$_$.a9;
41
+ var reversed = kotlin_kotlin.$_$.f6;
42
+ var last = kotlin_kotlin.$_$.p5;
43
+ var emptyList = kotlin_kotlin.$_$.t4;
44
+ var plus_0 = kotlin_kotlin.$_$.c6;
68
45
  var Regex_init_$Create$ = kotlin_kotlin.$_$.u;
69
- var objectMeta = kotlin_kotlin.$_$.b9;
70
- var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.p1;
71
- var contains = kotlin_kotlin.$_$.ia;
72
- var mapOf = kotlin_kotlin.$_$.v5;
46
+ var objectMeta = kotlin_kotlin.$_$.w8;
47
+ var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.o1;
48
+ var contains = kotlin_kotlin.$_$.da;
49
+ var mapOf = kotlin_kotlin.$_$.u5;
73
50
  var RegexOption_IGNORE_CASE_getInstance = kotlin_kotlin.$_$.h;
74
51
  var RegexOption_MULTILINE_getInstance = kotlin_kotlin.$_$.i;
75
- var setOf_0 = kotlin_kotlin.$_$.m6;
76
- var Regex = kotlin_kotlin.$_$.ea;
77
- var firstOrNull_0 = kotlin_kotlin.$_$.na;
78
- var lastIndexOf = kotlin_kotlin.$_$.za;
79
- var Char = kotlin_kotlin.$_$.bc;
80
- var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.t1;
81
- var mapNotNull = kotlin_kotlin.$_$.aa;
82
- var toList_0 = kotlin_kotlin.$_$.da;
83
- var maxOrNull_0 = kotlin_kotlin.$_$.ca;
84
- var get = kotlin_kotlin.$_$.pa;
85
- var toIntOrNull = kotlin_kotlin.$_$.sb;
86
- var Companion_instance = kotlin_kotlin.$_$.g3;
87
- var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.x1;
88
- var createFailure = kotlin_kotlin.$_$.ad;
89
- var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.a2;
90
- var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.y1;
91
- var Enum = kotlin_kotlin.$_$.fc;
92
- var copyToArray = kotlin_kotlin.$_$.q4;
93
- var json = kotlin_kotlin.$_$.u8;
52
+ var setOf = kotlin_kotlin.$_$.h6;
53
+ var Regex = kotlin_kotlin.$_$.z9;
54
+ var firstOrNull_0 = kotlin_kotlin.$_$.ia;
55
+ var lastIndexOf = kotlin_kotlin.$_$.ua;
56
+ var Char = kotlin_kotlin.$_$.wb;
57
+ var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.s1;
58
+ var mapNotNull = kotlin_kotlin.$_$.v9;
59
+ var toList_0 = kotlin_kotlin.$_$.y9;
60
+ var maxOrNull_0 = kotlin_kotlin.$_$.x9;
61
+ var get = kotlin_kotlin.$_$.ka;
62
+ var toIntOrNull = kotlin_kotlin.$_$.nb;
63
+ var Companion_instance = kotlin_kotlin.$_$.f3;
64
+ var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.w1;
65
+ var createFailure = kotlin_kotlin.$_$.vc;
66
+ var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.z1;
67
+ var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.x1;
68
+ var Enum = kotlin_kotlin.$_$.ac;
69
+ var first = kotlin_kotlin.$_$.y4;
70
+ var copyToArray = kotlin_kotlin.$_$.p4;
71
+ var json = kotlin_kotlin.$_$.p8;
94
72
  //endregion
95
73
  //region block: pre-declaration
96
74
  setMetadataFor(CommitInspectionResult, 'CommitInspectionResult', classMeta);
@@ -104,554 +82,98 @@
104
82
  setMetadataFor(TagRef, 'TagRef', classMeta);
105
83
  //endregion
106
84
  function allContributionCommits(_this__u8e3s4) {
107
- var log = _this__u8e3s4.n17();
85
+ var log = _this__u8e3s4.l17();
108
86
  // Inline function 'kotlin.collections.filter' call
109
- // Inline function 'kotlin.collections.filterTo' call
110
- var this_0 = _this__u8e3s4.o17();
111
- var destination = ArrayList_init_$Create$();
87
+ // Inline function 'kotlin.collections.distinctBy' call
88
+ var this_0 = _this__u8e3s4.m17();
89
+ var set = HashSet_init_$Create$();
90
+ var list = ArrayList_init_$Create$();
112
91
  var tmp0_iterator = this_0.r();
113
92
  while (tmp0_iterator.s()) {
114
- var element = tmp0_iterator.u();
93
+ var e = tmp0_iterator.u();
94
+ // Inline function 'com.zegreatrob.tools.digger.core.allContributionCommits.<anonymous>' call
95
+ var key = e.o17_1;
96
+ if (set.o(key)) {
97
+ list.o(e);
98
+ }
99
+ }
100
+ // Inline function 'kotlin.collections.filterTo' call
101
+ var destination = ArrayList_init_$Create$();
102
+ var tmp0_iterator_0 = list.r();
103
+ while (tmp0_iterator_0.s()) {
104
+ var element = tmp0_iterator_0.u();
115
105
  // Inline function 'com.zegreatrob.tools.digger.core.allContributionCommits.<anonymous>' call
116
106
  // Inline function 'kotlin.collections.map' call
117
107
  // Inline function 'kotlin.collections.mapTo' call
118
108
  var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(log, 10));
119
- var tmp0_iterator_0 = log.r();
120
- while (tmp0_iterator_0.s()) {
121
- var item = tmp0_iterator_0.u();
122
- var tmp$ret$0 = item.p17_1;
123
- destination_0.o(tmp$ret$0);
109
+ var tmp0_iterator_1 = log.r();
110
+ while (tmp0_iterator_1.s()) {
111
+ var item = tmp0_iterator_1.u();
112
+ var tmp$ret$2 = item.q17_1;
113
+ destination_0.o(tmp$ret$2);
124
114
  }
125
- if (destination_0.n(element.w17_1)) {
115
+ if (destination_0.n(element.o17_1)) {
126
116
  destination.o(element);
127
117
  }
128
118
  }
129
119
  var tags = destination;
130
- var trunkPath = findTrunkPath(tags, log);
131
- // Inline function 'kotlin.collections.map' call
132
- var this_1 = foldInBranches(relateToCommits(tags, trunkPath), minus(log, toSet(trunkPath)));
133
- // Inline function 'kotlin.collections.mapTo' call
134
- var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
135
- var tmp0_iterator_1 = this_1.r();
136
- while (tmp0_iterator_1.s()) {
137
- var item_0 = tmp0_iterator_1.u();
138
- // Inline function 'com.zegreatrob.tools.digger.core.allContributionCommits.<anonymous>' call
139
- var tag = item_0.a6();
140
- var commitSet = item_0.b6();
141
- // Inline function 'kotlin.collections.map' call
142
- // Inline function 'kotlin.collections.mapTo' call
143
- var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(commitSet, 10));
144
- var tmp0_iterator_2 = commitSet.r();
145
- while (tmp0_iterator_2.s()) {
146
- var item_1 = tmp0_iterator_2.u();
147
- // Inline function 'com.zegreatrob.tools.digger.core.allContributionCommits.<anonymous>.<anonymous>' call
148
- var tmp$ret$6 = item_1.p17_1;
149
- destination_2.o(tmp$ret$6);
150
- }
151
- var tmp$ret$9 = to(tag, toSet(destination_2));
152
- destination_1.o(tmp$ret$9);
153
- }
154
- return withCommitsInOriginalOrder(destination_1, log);
155
- }
156
- function findTrunkPath(_this__u8e3s4, log) {
157
- var tmp = first(log);
158
- // Inline function 'kotlin.collections.map' call
159
- // Inline function 'kotlin.collections.mapTo' call
160
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
161
- var tmp0_iterator = _this__u8e3s4.r();
162
- while (tmp0_iterator.s()) {
163
- var item = tmp0_iterator.u();
164
- // Inline function 'com.zegreatrob.tools.digger.core.findTrunkPath.<anonymous>' call
165
- var tmp$ret$0 = item.w17_1;
166
- destination.o(tmp$ret$0);
167
- }
168
- var tmp_0 = allPaths(log, tmp, toSet(destination));
169
- // Inline function 'kotlin.collections.map' call
170
- // Inline function 'kotlin.collections.mapTo' call
171
- var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
172
- var tmp0_iterator_0 = _this__u8e3s4.r();
173
- while (tmp0_iterator_0.s()) {
174
- var item_0 = tmp0_iterator_0.u();
175
- // Inline function 'com.zegreatrob.tools.digger.core.findTrunkPath.<anonymous>' call
176
- var tmp$ret$3 = item_0.w17_1;
177
- destination_0.o(tmp$ret$3);
178
- }
179
- var tmp0_elvis_lhs = shortestPathWithMostTags(tmp_0, toSet(destination_0));
180
- return tmp0_elvis_lhs == null ? alwaysLeftParent(log) : tmp0_elvis_lhs;
120
+ return sortIntoTagSets(_this__u8e3s4, tags, log);
181
121
  }
182
- function withCommitsInOriginalOrder(_this__u8e3s4, log) {
122
+ function sortIntoTagSets(_this__u8e3s4, tagRefs, log) {
123
+ // Inline function 'kotlin.collections.filter' call
183
124
  // Inline function 'kotlin.collections.map' call
125
+ var this_0 = tagPairs(tagRefs);
184
126
  // Inline function 'kotlin.collections.mapTo' call
185
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
186
- var tmp0_iterator = _this__u8e3s4.r();
187
- while (tmp0_iterator.s()) {
188
- var item = tmp0_iterator.u();
189
- // Inline function 'com.zegreatrob.tools.digger.core.withCommitsInOriginalOrder.<anonymous>' call
190
- var tag = item.a6();
191
- var commitIds = item.b6();
192
- // Inline function 'kotlin.collections.filter' call
193
- // Inline function 'kotlin.collections.filterTo' call
194
- var destination_0 = ArrayList_init_$Create$();
195
- var tmp0_iterator_0 = log.r();
196
- while (tmp0_iterator_0.s()) {
197
- var element = tmp0_iterator_0.u();
198
- // Inline function 'com.zegreatrob.tools.digger.core.withCommitsInOriginalOrder.<anonymous>.<anonymous>' call
199
- if (commitIds.n(element.p17_1)) {
200
- destination_0.o(element);
201
- }
202
- }
203
- var tmp$ret$3 = to(tag, destination_0);
204
- destination.o(tmp$ret$3);
205
- }
206
- return destination;
207
- }
208
- function foldInBranches(_this__u8e3s4, offMainCommits) {
209
- // Inline function 'kotlin.collections.fold' call
210
- var this_0 = reversed(_this__u8e3s4);
211
- var accumulator = emptyList();
127
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
212
128
  var tmp0_iterator = this_0.r();
213
129
  while (tmp0_iterator.s()) {
214
- var element = tmp0_iterator.u();
215
- // Inline function 'com.zegreatrob.tools.digger.core.foldInBranches.<anonymous>' call
216
- var acc = accumulator;
217
- var tag = element.a6();
218
- var commitSet = element.b6();
219
- // Inline function 'kotlin.collections.flatMap' call
220
- // Inline function 'kotlin.collections.flatMapTo' call
221
- var destination = ArrayList_init_$Create$();
222
- var tmp0_iterator_0 = acc.r();
223
- while (tmp0_iterator_0.s()) {
224
- var element_0 = tmp0_iterator_0.u();
225
- // Inline function 'com.zegreatrob.tools.digger.core.foldInBranches.<anonymous>.<anonymous>' call
226
- var list = element_0.z5_1;
227
- addAll(destination, list);
228
- }
229
- accumulator = plus(acc, to(tag, foldInBranches_0(commitSet, minus(offMainCommits, toSet(destination)))));
230
- }
231
- var tmp$ret$4 = accumulator;
232
- return reversed(tmp$ret$4);
233
- }
234
- function relateToCommits(_this__u8e3s4, trunkPath) {
235
- // Inline function 'kotlin.collections.fold' call
236
- var accumulator = emptyList();
237
- var tmp0_iterator = trunkPath.r();
238
- while (tmp0_iterator.s()) {
239
- var element = tmp0_iterator.u();
240
- // Inline function 'com.zegreatrob.tools.digger.core.relateToCommits.<anonymous>' call
241
- var acc = accumulator;
242
- // Inline function 'kotlin.collections.find' call
243
- var tmp$ret$1;
244
- $l$block: {
245
- // Inline function 'kotlin.collections.firstOrNull' call
246
- var tmp0_iterator_0 = _this__u8e3s4.r();
247
- while (tmp0_iterator_0.s()) {
248
- var element_0 = tmp0_iterator_0.u();
249
- // Inline function 'com.zegreatrob.tools.digger.core.relateToCommits.<anonymous>.<anonymous>' call
250
- if (element_0.w17_1 === element.p17_1) {
251
- tmp$ret$1 = element_0;
252
- break $l$block;
253
- }
254
- }
255
- tmp$ret$1 = null;
256
- }
257
- var tag = tmp$ret$1;
258
- var tmp;
259
- if (!(tag == null)) {
260
- tmp = plus(acc, to(tag, setOf(element)));
261
- } else {
262
- var lastPair = lastOrNull(acc);
263
- var lastList = lastPair == null ? null : lastPair.z5_1;
264
- var tmp_0;
265
- if (!(lastList == null)) {
266
- var tmp_1 = slice(acc, numberRangeToNumber(0, acc.l() - 2 | 0));
267
- // Inline function 'kotlin.collections.plusElement' call
268
- var tmp$ret$3 = plus_0(lastList, element);
269
- tmp_0 = plus(tmp_1, lastPair.kf(VOID, tmp$ret$3));
270
- } else {
271
- tmp_0 = plus(acc, to(null, setOf(element)));
272
- }
273
- tmp = tmp_0;
274
- }
275
- accumulator = tmp;
276
- }
277
- var tagSets = accumulator;
278
- return tagSets;
279
- }
280
- function shortestPathWithMostTags(_this__u8e3s4, taggedCommitIds) {
281
- // Inline function 'kotlin.collections.groupBy' call
282
- // Inline function 'kotlin.collections.groupByTo' call
283
- var destination = LinkedHashMap_init_$Create$();
284
- var tmp0_iterator = _this__u8e3s4.r();
285
- while (tmp0_iterator.s()) {
286
- var element = tmp0_iterator.u();
287
- // Inline function 'com.zegreatrob.tools.digger.core.shortestPathWithMostTags.<anonymous>' call
288
- var tmp$ret$0;
289
- $l$block: {
290
- // Inline function 'kotlin.collections.count' call
291
- var tmp;
292
- if (isInterface(element, Collection)) {
293
- tmp = element.y();
294
- } else {
295
- tmp = false;
296
- }
297
- if (tmp) {
298
- tmp$ret$0 = 0;
299
- break $l$block;
300
- }
301
- var count = 0;
302
- var tmp0_iterator_0 = element.r();
303
- while (tmp0_iterator_0.s()) {
304
- var element_0 = tmp0_iterator_0.u();
305
- // Inline function 'com.zegreatrob.tools.digger.core.shortestPathWithMostTags.<anonymous>.<anonymous>' call
306
- if (taggedCommitIds.n(element_0.p17_1)) {
307
- count = count + 1 | 0;
308
- checkCountOverflow(count);
309
- }
310
- }
311
- tmp$ret$0 = count;
312
- }
313
- var key = tmp$ret$0;
314
- // Inline function 'kotlin.collections.getOrPut' call
315
- var value = destination.s2(key);
316
- var tmp_0;
317
- if (value == null) {
318
- // Inline function 'kotlin.collections.groupByTo.<anonymous>' call
319
- var answer = ArrayList_init_$Create$();
320
- destination.j2(key, answer);
321
- tmp_0 = answer;
322
- } else {
323
- tmp_0 = value;
324
- }
325
- var list = tmp_0;
326
- list.o(element);
327
- }
328
- var pathTagCountGroups = destination;
329
- var tmp0_safe_receiver = pathTagCountGroups.s2(max(pathTagCountGroups.i2()));
330
- var tmp_1;
331
- if (tmp0_safe_receiver == null) {
332
- tmp_1 = null;
333
- } else {
334
- var tmp$ret$7;
335
- $l$block_0: {
336
- // Inline function 'kotlin.collections.minBy' call
337
- var iterator = tmp0_safe_receiver.r();
338
- if (!iterator.s())
339
- throw NoSuchElementException_init_$Create$();
340
- var minElem = iterator.u();
341
- if (!iterator.s()) {
342
- tmp$ret$7 = minElem;
343
- break $l$block_0;
344
- }
345
- // Inline function 'com.zegreatrob.tools.digger.core.shortestPathWithMostTags.<anonymous>' call
346
- var minValue = minElem.l();
347
- do {
348
- var e = iterator.u();
349
- // Inline function 'com.zegreatrob.tools.digger.core.shortestPathWithMostTags.<anonymous>' call
350
- var v = e.l();
351
- if (compareTo(minValue, v) > 0) {
352
- minElem = e;
353
- minValue = v;
354
- }
355
- }
356
- while (iterator.s());
357
- tmp$ret$7 = minElem;
358
- }
359
- tmp_1 = tmp$ret$7;
360
- }
361
- return tmp_1;
362
- }
363
- function alwaysLeftParent(_this__u8e3s4) {
364
- // Inline function 'kotlin.collections.fold' call
365
- var accumulator = emptyList();
366
- var tmp0_iterator = _this__u8e3s4.r();
367
- while (tmp0_iterator.s()) {
368
- var element = tmp0_iterator.u();
369
- // Inline function 'com.zegreatrob.tools.digger.core.alwaysLeftParent.<anonymous>' call
370
- var acc = accumulator;
130
+ var item = tmp0_iterator.u();
131
+ // Inline function 'com.zegreatrob.tools.digger.core.sortIntoTagSets.<anonymous>' call
132
+ var earlierTag = item.a6();
133
+ var nextTag = item.b6();
371
134
  var tmp;
372
- if (acc.y()) {
373
- tmp = plus(acc, element);
374
- } else if (element.p17_1 === firstOrNull(last(acc).t17_1)) {
375
- tmp = plus(acc, element);
135
+ if (earlierTag == null ? !(nextTag == null) : false) {
136
+ tmp = _this__u8e3s4.x17('^' + nextTag.o17_1, 'HEAD');
137
+ } else if (!(earlierTag == null) ? !(nextTag == null) : false) {
138
+ tmp = _this__u8e3s4.x17('^' + nextTag.o17_1, earlierTag.o17_1);
139
+ } else if (!(earlierTag == null)) {
140
+ tmp = _this__u8e3s4.w17(earlierTag.o17_1);
376
141
  } else {
377
- tmp = acc;
142
+ tmp = alwaysLeftParent(log);
378
143
  }
379
- accumulator = tmp;
380
- }
381
- return accumulator;
382
- }
383
- function foldInBranches_0(commitSet, remainingOffMainCommits) {
384
- // Inline function 'kotlin.collections.fold' call
385
- var accumulator = emptySet();
386
- var tmp0_iterator = commitSet.r();
387
- while (tmp0_iterator.s()) {
388
- var element = tmp0_iterator.u();
389
- // Inline function 'com.zegreatrob.tools.digger.core.foldInBranches.<anonymous>' call
390
- var acc = accumulator;
391
- var tmp = plus_0(acc, element);
392
- var tmp_0;
393
- if (element.t17_1.l() <= 1) {
394
- tmp_0 = emptyList();
395
- } else {
396
- tmp_0 = plus_1(branchCommits(element.t17_1.c1(0), minus(remainingOffMainCommits, acc)), branchCommits(element.t17_1.c1(1), minus(remainingOffMainCommits, acc)));
397
- }
398
- accumulator = plus_2(tmp, tmp_0);
399
- }
400
- return accumulator;
401
- }
402
- function branchCommits(id, offMainCommits) {
403
- // Inline function 'kotlin.collections.fold' call
404
- var this_0 = numberRangeToNumber(0, offMainCommits.l());
405
- var accumulator = to(listOf(id), emptyList());
406
- var tmp0_iterator = this_0.r();
407
- while (tmp0_iterator.s()) {
408
- var element = tmp0_iterator.u();
409
- // Inline function 'com.zegreatrob.tools.digger.core.branchCommits.<anonymous>' call
410
- var name_for_destructuring_parameter_0_fjsvno = accumulator;
411
- var ids = name_for_destructuring_parameter_0_fjsvno.a6();
412
- var foundCommits = name_for_destructuring_parameter_0_fjsvno.b6();
413
- // Inline function 'kotlin.collections.filter' call
414
- // Inline function 'kotlin.collections.filterTo' call
415
- var destination = ArrayList_init_$Create$();
416
- var tmp0_iterator_0 = offMainCommits.r();
417
- while (tmp0_iterator_0.s()) {
418
- var element_0 = tmp0_iterator_0.u();
419
- // Inline function 'com.zegreatrob.tools.digger.core.branchCommits.<anonymous>.<anonymous>' call
420
- if (ids.n(element_0.p17_1)) {
421
- destination.o(element_0);
422
- }
423
- }
424
- var newCommits = destination;
425
- // Inline function 'kotlin.collections.flatMap' call
426
- // Inline function 'kotlin.collections.flatMapTo' call
427
- var destination_0 = ArrayList_init_$Create$();
428
- var tmp0_iterator_1 = newCommits.r();
429
- while (tmp0_iterator_1.s()) {
430
- var element_1 = tmp0_iterator_1.u();
431
- // Inline function 'com.zegreatrob.tools.digger.core.branchCommits.<anonymous>.<anonymous>' call
432
- var list = element_1.t17_1;
433
- addAll(destination_0, list);
434
- }
435
- accumulator = to(destination_0, plus_1(foundCommits, newCommits));
436
- }
437
- return accumulator.z5_1;
438
- }
439
- function allPaths(log, firstTagCommit, preferredCommitIds) {
440
- preferredCommitIds = preferredCommitIds === VOID ? emptySet() : preferredCommitIds;
441
- // Inline function 'kotlin.collections.associateBy' call
442
- var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(log, 10)), 16);
443
- // Inline function 'kotlin.collections.associateByTo' call
444
- var destination = LinkedHashMap_init_$Create$_0(capacity);
445
- var tmp0_iterator = log.r();
446
- while (tmp0_iterator.s()) {
447
- var element = tmp0_iterator.u();
448
- // Inline function 'com.zegreatrob.tools.digger.core.allPaths.<anonymous>' call
449
- var tmp$ret$0 = element.p17_1;
450
- destination.j2(tmp$ret$0, element);
451
- }
452
- var commitMap = destination;
453
- var tmp$ret$4;
454
- $l$block: {
455
- // Inline function 'kotlin.collections.last' call
456
- var iterator = log.y1(log.l());
457
- while (iterator.l1()) {
458
- var element_0 = iterator.n1();
459
- // Inline function 'com.zegreatrob.tools.digger.core.allPaths.<anonymous>' call
460
- if (element_0.t17_1.y()) {
461
- tmp$ret$4 = element_0;
462
- break $l$block;
463
- }
464
- }
465
- throw NoSuchElementException_init_$Create$_0('List contains no element matching the predicate.');
144
+ var tmp$ret$0 = to(earlierTag, tmp);
145
+ destination.o(tmp$ret$0);
466
146
  }
467
- var rootCommit = tmp$ret$4;
468
- // Inline function 'kotlin.collections.mutableListOf' call
469
- var allPaths = ArrayList_init_$Create$();
470
- var currentPath = emptyList();
471
- var pendingCommits = mutableListOf([to(firstTagCommit, null)]);
472
- // Inline function 'kotlin.collections.mutableMapOf' call
473
- var pathCache = LinkedHashMap_init_$Create$();
474
- println('');
475
- $l$loop: while (true) {
476
- var tmp;
477
- var tmp_0;
147
+ // Inline function 'kotlin.collections.filterTo' call
148
+ var destination_0 = ArrayList_init_$Create$();
149
+ var tmp0_iterator_0 = destination.r();
150
+ while (tmp0_iterator_0.s()) {
151
+ var element = tmp0_iterator_0.u();
152
+ // Inline function 'com.zegreatrob.tools.digger.core.sortIntoTagSets.<anonymous>' call
478
153
  // Inline function 'kotlin.collections.isNotEmpty' call
479
- if (!pendingCommits.y()) {
480
- tmp_0 = allPaths.l() < 20000;
481
- } else {
482
- tmp_0 = false;
483
- }
484
- if (tmp_0) {
485
- tmp = preferredCommitIds.y() ? true : allPaths.l() === 0;
486
- } else {
487
- tmp = false;
488
- }
489
- if (!tmp) {
490
- break $l$loop;
491
- }
492
- var currentEntry = last(pendingCommits);
493
- var currentCommit = currentEntry.a6();
494
- var child = currentEntry.b6();
495
- removeLast(pendingCommits);
496
- var tmp2_elvis_lhs = child == null ? null : child + 1 | 0;
497
- var toIndex = tmp2_elvis_lhs == null ? currentPath.l() : tmp2_elvis_lhs;
498
- if (!(child == null)) {
499
- if (equals(lastOrNull(currentPath), rootCommit)) {
500
- updateCache(pathCache, currentPath.c1(toIndex), allPaths);
501
- }
154
+ if (!element.z5_1.y()) {
155
+ destination_0.o(element);
502
156
  }
503
- currentPath = plus(currentPath.z1(0, toIndex), currentCommit);
504
- if (currentCommit.t17_1.y()) {
505
- if (!currentCommit.equals(rootCommit)) {
506
- throw Exception_init_$Create$(currentCommit.p17_1 + ' was not ' + rootCommit.p17_1);
507
- }
508
- // Inline function 'kotlin.collections.plusAssign' call
509
- var element_1 = currentPath;
510
- allPaths.o(element_1);
511
- } else {
512
- // Inline function 'kotlin.let' call
513
- // Inline function 'kotlin.collections.mapNotNull' call
514
- // Inline function 'kotlin.collections.mapNotNullTo' call
515
- var this_0 = currentCommit.t17_1;
516
- var destination_0 = ArrayList_init_$Create$();
517
- // Inline function 'kotlin.collections.forEach' call
518
- var tmp0_iterator_0 = this_0.r();
519
- while (tmp0_iterator_0.s()) {
520
- var element_2 = tmp0_iterator_0.u();
521
- // Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
522
- // Inline function 'com.zegreatrob.tools.digger.core.allPaths.<anonymous>' call
523
- var tmp0_safe_receiver = commitMap.s2(element_2);
524
- if (tmp0_safe_receiver == null)
525
- null;
526
- else {
527
- // Inline function 'kotlin.let' call
528
- // Inline function 'kotlin.contracts.contract' call
529
- destination_0.o(tmp0_safe_receiver);
530
- }
531
- }
532
- // Inline function 'kotlin.contracts.contract' call
533
- // Inline function 'com.zegreatrob.tools.digger.core.allPaths.<anonymous>' call
534
- // Inline function 'kotlin.takeIf' call
535
- // Inline function 'kotlin.collections.filter' call
536
- // Inline function 'kotlin.collections.filterTo' call
537
- var destination_1 = ArrayList_init_$Create$();
538
- var tmp0_iterator_1 = destination_0.r();
539
- while (tmp0_iterator_1.s()) {
540
- var element_3 = tmp0_iterator_1.u();
541
- // Inline function 'com.zegreatrob.tools.digger.core.allPaths.<anonymous>.<anonymous>' call
542
- if (preferredCommitIds.n(element_3.p17_1)) {
543
- destination_1.o(element_3);
544
- }
545
- }
546
- // Inline function 'kotlin.contracts.contract' call
547
- var tmp_1;
548
- // Inline function 'kotlin.collections.isNotEmpty' call
549
- if (!destination_1.y()) {
550
- tmp_1 = destination_1;
551
- } else {
552
- tmp_1 = null;
553
- }
554
- var tmp0_elvis_lhs = tmp_1;
555
- var parentRefs = tmp0_elvis_lhs == null ? destination_0 : tmp0_elvis_lhs;
556
- // Inline function 'kotlin.collections.filterKeys' call
557
- var result = LinkedHashMap_init_$Create$();
558
- // Inline function 'kotlin.collections.iterator' call
559
- var tmp0_iterator_2 = pathCache.l2().r();
560
- while (tmp0_iterator_2.s()) {
561
- var entry = tmp0_iterator_2.u();
562
- // Inline function 'com.zegreatrob.tools.digger.core.allPaths.<anonymous>' call
563
- var it = entry.m2();
564
- if (parentRefs.n(it)) {
565
- result.j2(entry.m2(), entry.n2());
566
- }
567
- }
568
- var parentRefsWithCacheEntries = result;
569
- // Inline function 'kotlin.collections.plusAssign' call
570
- // Inline function 'kotlin.collections.flatMap' call
571
- // Inline function 'kotlin.collections.flatMapTo' call
572
- var destination_2 = ArrayList_init_$Create$();
573
- // Inline function 'kotlin.collections.iterator' call
574
- var tmp0_iterator_3 = parentRefsWithCacheEntries.l2().r();
575
- while (tmp0_iterator_3.s()) {
576
- var element_4 = tmp0_iterator_3.u();
577
- // Inline function 'com.zegreatrob.tools.digger.core.allPaths.<anonymous>' call
578
- // Inline function 'kotlin.collections.component2' call
579
- var cache = element_4.n2();
580
- // Inline function 'kotlin.collections.map' call
581
- // Inline function 'kotlin.collections.mapTo' call
582
- var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(cache, 10));
583
- var tmp0_iterator_4 = cache.r();
584
- while (tmp0_iterator_4.s()) {
585
- var item = tmp0_iterator_4.u();
586
- // Inline function 'com.zegreatrob.tools.digger.core.allPaths.<anonymous>.<anonymous>' call
587
- var tmp$ret$24 = plus_1(currentPath, item);
588
- destination_3.o(tmp$ret$24);
589
- }
590
- var list = destination_3;
591
- addAll(destination_2, list);
592
- }
593
- addAll(allPaths, destination_2);
594
- // Inline function 'kotlin.collections.plusAssign' call
595
- // Inline function 'kotlin.collections.map' call
596
- var this_1 = minus(parentRefs, parentRefsWithCacheEntries.i2());
597
- // Inline function 'kotlin.collections.mapTo' call
598
- var destination_4 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
599
- var tmp0_iterator_5 = this_1.r();
600
- while (tmp0_iterator_5.s()) {
601
- var item_0 = tmp0_iterator_5.u();
602
- // Inline function 'com.zegreatrob.tools.digger.core.allPaths.<anonymous>' call
603
- var tmp$ret$30 = new Pair(item_0, currentPath.l() - 1 | 0);
604
- destination_4.o(tmp$ret$30);
605
- }
606
- addAll(pendingCommits, destination_4);
607
- }
608
- removeAll(allPaths, allPaths$lambda(preferredCommitIds));
609
- reportState(allPaths, pendingCommits, pathCache);
610
157
  }
611
- println('');
612
- return allPaths;
158
+ return destination_0;
613
159
  }
614
- function updateCache(_this__u8e3s4, cacheKey, allPaths) {
615
- // Inline function 'kotlin.collections.set' call
616
- // Inline function 'kotlin.collections.map' call
617
- // Inline function 'kotlin.collections.filter' call
618
- // Inline function 'kotlin.collections.filterTo' call
619
- var destination = ArrayList_init_$Create$();
620
- var tmp0_iterator = allPaths.r();
160
+ function tagPairs(_this__u8e3s4) {
161
+ var tmp = listOf(new Pair(null, firstOrNull(_this__u8e3s4)));
162
+ // Inline function 'kotlin.collections.mapIndexed' call
163
+ // Inline function 'kotlin.collections.mapIndexedTo' call
164
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
165
+ var index = 0;
166
+ var tmp0_iterator = _this__u8e3s4.r();
621
167
  while (tmp0_iterator.s()) {
622
- var element = tmp0_iterator.u();
623
- // Inline function 'com.zegreatrob.tools.digger.core.updateCache.<anonymous>' call
624
- if (element.n(cacheKey)) {
625
- destination.o(element);
626
- }
627
- }
628
- // Inline function 'kotlin.collections.mapTo' call
629
- var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
630
- var tmp0_iterator_0 = destination.r();
631
- while (tmp0_iterator_0.s()) {
632
- var item = tmp0_iterator_0.u();
633
- // Inline function 'com.zegreatrob.tools.digger.core.updateCache.<anonymous>' call
634
- var tmp$ret$3 = item.z1(item.x1(cacheKey), item.l());
635
- destination_0.o(tmp$ret$3);
168
+ var item = tmp0_iterator.u();
169
+ // Inline function 'com.zegreatrob.tools.digger.core.tagPairs.<anonymous>' call
170
+ var tmp1 = index;
171
+ index = tmp1 + 1 | 0;
172
+ var index_0 = checkIndexOverflow(tmp1);
173
+ var tmp$ret$0 = to(item, getOrNull(_this__u8e3s4, index_0 + 1 | 0));
174
+ destination.o(tmp$ret$0);
636
175
  }
637
- _this__u8e3s4.j2(cacheKey, destination_0);
638
- }
639
- function reportState(allPaths, pendingCommits, pathCache) {
640
- print('\rFound ' + allPaths.l() + ' paths. pending commits ' + pendingCommits.l() + ' cache size ' + pathCache.l());
641
- }
642
- function allPaths$lambda($preferredCommitIds) {
643
- return function (it) {
644
- // Inline function 'kotlin.collections.map' call
645
- // Inline function 'kotlin.collections.mapTo' call
646
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(it, 10));
647
- var tmp0_iterator = it.r();
648
- while (tmp0_iterator.s()) {
649
- var item = tmp0_iterator.u();
650
- var tmp$ret$0 = item.p17_1;
651
- destination.o(tmp$ret$0);
652
- }
653
- return !destination.x($preferredCommitIds);
654
- };
176
+ return plus(tmp, destination);
655
177
  }
656
178
  function CommitInspectionResult(storyId, ease, authors, semver) {
657
179
  this.y17_1 = storyId;
@@ -686,23 +208,23 @@
686
208
  return true;
687
209
  };
688
210
  function CommitRef(id, authorEmail, committerEmail, dateTime, parents, fullMessage) {
689
- this.p17_1 = id;
690
- this.q17_1 = authorEmail;
691
- this.r17_1 = committerEmail;
692
- this.s17_1 = dateTime;
693
- this.t17_1 = parents;
694
- this.u17_1 = fullMessage;
211
+ this.q17_1 = id;
212
+ this.r17_1 = authorEmail;
213
+ this.s17_1 = committerEmail;
214
+ this.t17_1 = dateTime;
215
+ this.u17_1 = parents;
216
+ this.v17_1 = fullMessage;
695
217
  }
696
218
  protoOf(CommitRef).toString = function () {
697
- return 'CommitRef(id=' + this.p17_1 + ', authorEmail=' + this.q17_1 + ', committerEmail=' + this.r17_1 + ', dateTime=' + this.s17_1 + ', parents=' + this.t17_1 + ', fullMessage=' + this.u17_1 + ')';
219
+ return 'CommitRef(id=' + this.q17_1 + ', authorEmail=' + this.r17_1 + ', committerEmail=' + this.s17_1 + ', dateTime=' + this.t17_1 + ', parents=' + this.u17_1 + ', fullMessage=' + this.v17_1 + ')';
698
220
  };
699
221
  protoOf(CommitRef).hashCode = function () {
700
- var result = getStringHashCode(this.p17_1);
701
- result = imul(result, 31) + getStringHashCode(this.q17_1) | 0;
222
+ var result = getStringHashCode(this.q17_1);
702
223
  result = imul(result, 31) + getStringHashCode(this.r17_1) | 0;
703
- result = imul(result, 31) + this.s17_1.hashCode() | 0;
704
- result = imul(result, 31) + hashCode(this.t17_1) | 0;
705
- result = imul(result, 31) + getStringHashCode(this.u17_1) | 0;
224
+ result = imul(result, 31) + getStringHashCode(this.s17_1) | 0;
225
+ result = imul(result, 31) + this.t17_1.hashCode() | 0;
226
+ result = imul(result, 31) + hashCode(this.u17_1) | 0;
227
+ result = imul(result, 31) + getStringHashCode(this.v17_1) | 0;
706
228
  return result;
707
229
  };
708
230
  protoOf(CommitRef).equals = function (other) {
@@ -711,17 +233,17 @@
711
233
  if (!(other instanceof CommitRef))
712
234
  return false;
713
235
  var tmp0_other_with_cast = other instanceof CommitRef ? other : THROW_CCE();
714
- if (!(this.p17_1 === tmp0_other_with_cast.p17_1))
715
- return false;
716
236
  if (!(this.q17_1 === tmp0_other_with_cast.q17_1))
717
237
  return false;
718
238
  if (!(this.r17_1 === tmp0_other_with_cast.r17_1))
719
239
  return false;
720
- if (!this.s17_1.equals(tmp0_other_with_cast.s17_1))
240
+ if (!(this.s17_1 === tmp0_other_with_cast.s17_1))
241
+ return false;
242
+ if (!this.t17_1.equals(tmp0_other_with_cast.t17_1))
721
243
  return false;
722
- if (!equals(this.t17_1, tmp0_other_with_cast.t17_1))
244
+ if (!equals(this.u17_1, tmp0_other_with_cast.u17_1))
723
245
  return false;
724
- if (!(this.u17_1 === tmp0_other_with_cast.u17_1))
246
+ if (!(this.v17_1 === tmp0_other_with_cast.v17_1))
725
247
  return false;
726
248
  return true;
727
249
  };
@@ -733,19 +255,19 @@
733
255
  while (tmp0_iterator.s()) {
734
256
  var item = tmp0_iterator.u();
735
257
  // Inline function 'com.zegreatrob.tools.digger.core.contribution.<anonymous>' call
736
- var tmp$ret$0 = commitInspectionResult(item, _this__u8e3s4.i18(item.u17_1));
258
+ var tmp$ret$0 = commitInspectionResult(item, _this__u8e3s4.i18(item.v17_1));
737
259
  destination.o(tmp$ret$0);
738
260
  }
739
261
  var messageDigResults = destination;
740
262
  var lastCommit = firstOrNull(commitRefs);
741
263
  var firstCommit = lastOrNull(commitRefs);
742
- var tmp1_elvis_lhs = lastCommit == null ? null : lastCommit.p17_1;
264
+ var tmp1_elvis_lhs = lastCommit == null ? null : lastCommit.q17_1;
743
265
  var tmp7_lastCommit = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
744
- var tmp3_elvis_lhs = firstCommit == null ? null : firstCommit.p17_1;
266
+ var tmp3_elvis_lhs = firstCommit == null ? null : firstCommit.q17_1;
745
267
  var tmp8_firstCommit = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
746
268
  var tmp9_authors = allAuthors(messageDigResults);
747
- var tmp10_dateTime = lastCommit == null ? null : lastCommit.s17_1;
748
- var tmp11_firstCommitDateTime = firstCommit == null ? null : firstCommit.s17_1;
269
+ var tmp10_dateTime = lastCommit == null ? null : lastCommit.t17_1;
270
+ var tmp11_firstCommitDateTime = firstCommit == null ? null : firstCommit.t17_1;
749
271
  // Inline function 'kotlin.collections.mapNotNull' call
750
272
  // Inline function 'kotlin.collections.mapNotNullTo' call
751
273
  var destination_0 = ArrayList_init_$Create$();
@@ -791,7 +313,7 @@
791
313
  return new Contribution(tmp7_lastCommit, tmp8_firstCommit, tmp9_authors, tmp15_commitCount, tmp10_dateTime, tmp11_firstCommitDateTime, tmp12_ease, tmp13_storyId, tmp14_semver, null, null, null);
792
314
  }
793
315
  function commitInspectionResult(_this__u8e3s4, digResult) {
794
- return new CommitInspectionResult(digResult.j18_1, digResult.k18_1, plus_1(listOf_0([_this__u8e3s4.r17_1, _this__u8e3s4.q17_1]), digResult.l18_1), digResult.m18_1);
316
+ return new CommitInspectionResult(digResult.j18_1, digResult.k18_1, plus(listOf_0([_this__u8e3s4.s17_1, _this__u8e3s4.r17_1]), digResult.l18_1), digResult.m18_1);
795
317
  }
796
318
  function allAuthors(messageDigResults) {
797
319
  // Inline function 'kotlin.collections.map' call
@@ -850,9 +372,9 @@
850
372
  function currentContributionCommits(_this__u8e3s4, previousTag) {
851
373
  var tmp;
852
374
  if (previousTag == null) {
853
- tmp = _this__u8e3s4.n17();
375
+ tmp = _this__u8e3s4.l17();
854
376
  } else {
855
- tmp = _this__u8e3s4.n18(previousTag.v17_1, 'HEAD');
377
+ tmp = _this__u8e3s4.x17('^' + previousTag.n17_1, 'HEAD');
856
378
  }
857
379
  return tmp;
858
380
  }
@@ -862,7 +384,7 @@
862
384
  // Inline function 'com.zegreatrob.tools.digger.core.DiggerCore.currentRelevantTags.<anonymous>' call
863
385
  var latestTag = getOrNull(lastTwoTags, 0);
864
386
  var tmp;
865
- if ((latestTag == null ? null : latestTag.w17_1) === headCommitId) {
387
+ if ((latestTag == null ? null : latestTag.o17_1) === headCommitId) {
866
388
  tmp = to(latestTag, getOrNull(lastTwoTags, 1));
867
389
  } else {
868
390
  tmp = to(null, latestTag);
@@ -870,33 +392,33 @@
870
392
  return tmp;
871
393
  }
872
394
  function DiggerCore(label, gitWrapper, messageDigger) {
873
- this.o18_1 = label;
874
- this.p18_1 = gitWrapper;
875
- this.q18_1 = messageDigger;
395
+ this.n18_1 = label;
396
+ this.o18_1 = gitWrapper;
397
+ this.p18_1 = messageDigger;
876
398
  }
877
- protoOf(DiggerCore).r18 = function () {
399
+ protoOf(DiggerCore).q18 = function () {
878
400
  // Inline function 'kotlin.with' call
879
401
  // Inline function 'kotlin.contracts.contract' call
880
402
  // Inline function 'com.zegreatrob.tools.digger.core.DiggerCore.currentContributionData.<anonymous>' call
881
- var $this$with = this.p18_1;
882
- var tmp0_container = currentRelevantTags(this, $this$with.s18(), take($this$with.o17(), 2));
403
+ var $this$with = this.o18_1;
404
+ var tmp0_container = currentRelevantTags(this, $this$with.r18(), take($this$with.m17(), 2));
883
405
  var currentTag = tmp0_container.a6();
884
406
  var previousTag = tmp0_container.b6();
885
- var tmp = contribution(this.q18_1, currentContributionCommits($this$with, previousTag));
886
- var tmp_0 = currentTag == null ? null : currentTag.v17_1;
887
- return tmp.j17(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.o18_1, tmp_0, currentTag == null ? null : currentTag.x17_1);
407
+ var tmp = contribution(this.p18_1, currentContributionCommits($this$with, previousTag));
408
+ var tmp_0 = currentTag == null ? null : currentTag.n17_1;
409
+ return tmp.h17(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.n18_1, tmp_0, currentTag == null ? null : currentTag.p17_1);
888
410
  };
889
- protoOf(DiggerCore).t18 = function () {
411
+ protoOf(DiggerCore).s18 = function () {
890
412
  // Inline function 'kotlin.collections.map' call
891
413
  // Inline function 'kotlin.collections.map' call
892
- var this_0 = allContributionCommits(this.p18_1);
414
+ var this_0 = allContributionCommits(this.o18_1);
893
415
  // Inline function 'kotlin.collections.mapTo' call
894
416
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
895
417
  var tmp0_iterator = this_0.r();
896
418
  while (tmp0_iterator.s()) {
897
419
  var item = tmp0_iterator.u();
898
420
  // Inline function 'com.zegreatrob.tools.digger.core.DiggerCore.allContributionData.<anonymous>' call
899
- var tmp$ret$0 = to(item.y5_1, contribution(this.q18_1, toList(item.z5_1)));
421
+ var tmp$ret$0 = to(item.y5_1, contribution(this.p18_1, toList(item.z5_1)));
900
422
  destination.o(tmp$ret$0);
901
423
  }
902
424
  // Inline function 'kotlin.collections.mapTo' call
@@ -907,8 +429,8 @@
907
429
  // Inline function 'com.zegreatrob.tools.digger.core.DiggerCore.allContributionData.<anonymous>' call
908
430
  var tag = item_0.a6();
909
431
  var contribution_0 = item_0.b6();
910
- var tmp = tag == null ? null : tag.v17_1;
911
- var tmp$ret$3 = contribution_0.j17(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.o18_1, tmp, tag == null ? null : tag.x17_1);
432
+ var tmp = tag == null ? null : tag.n17_1;
433
+ var tmp$ret$3 = contribution_0.h17(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.n18_1, tmp, tag == null ? null : tag.p17_1);
912
434
  destination_0.o(tmp$ret$3);
913
435
  }
914
436
  return destination_0;
@@ -917,7 +439,7 @@
917
439
  // Inline function 'kotlin.collections.map' call
918
440
  // Inline function 'kotlin.collections.filter' call
919
441
  // Inline function 'kotlin.collections.filterTo' call
920
- var this_0 = split(outputText, [$this.l17_1 + '\n']);
442
+ var this_0 = split(outputText, [$this.j17_1 + '\n']);
921
443
  var destination = ArrayList_init_$Create$();
922
444
  var tmp0_iterator = this_0.r();
923
445
  while (tmp0_iterator.s()) {
@@ -938,7 +460,7 @@
938
460
  var tmp = elements.c1(0);
939
461
  var tmp_0 = elements.c1(1);
940
462
  var tmp_1 = elements.c1(2);
941
- var tmp_2 = Companion_getInstance().n16(elements.c1(3));
463
+ var tmp_2 = Companion_getInstance().l16(elements.c1(3));
942
464
  // Inline function 'kotlin.collections.filter' call
943
465
  // Inline function 'kotlin.collections.filterTo' call
944
466
  var this_1 = split(elements.c1(4), [' ']);
@@ -958,17 +480,17 @@
958
480
  return destination_0;
959
481
  }
960
482
  function DiggerGitWrapper(workingDirectory) {
961
- this.k17_1 = workingDirectory;
962
- this.l17_1 = '--------!--------';
963
- this.m17_1 = '%H%n%ae%n%ce%n%aI%n%P%n%B%n' + this.l17_1;
483
+ this.i17_1 = workingDirectory;
484
+ this.j17_1 = '--------!--------';
485
+ this.k17_1 = '%H%n%ae%n%ce%n%aI%n%P%n%B%n' + this.j17_1;
964
486
  }
965
- protoOf(DiggerGitWrapper).s18 = function () {
487
+ protoOf(DiggerGitWrapper).r18 = function () {
966
488
  // Inline function 'kotlin.text.trim' call
967
- var this_0 = runProcess(listOf_0(['git', '--no-pager', 'rev-parse', 'HEAD']), this.k17_1);
489
+ var this_0 = runProcess(listOf_0(['git', '--no-pager', 'rev-parse', 'HEAD']), this.i17_1);
968
490
  return toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
969
491
  };
970
- protoOf(DiggerGitWrapper).o17 = function () {
971
- var outputText = runProcess(listOf_0(['git', '--no-pager', 'tag', '--list', '--sort=-taggerdate', '--format=%(refname:strip=2),%(*objectname),%(creatordate:iso-strict)']), this.k17_1);
492
+ protoOf(DiggerGitWrapper).m17 = function () {
493
+ var outputText = runProcess(listOf_0(['git', '--no-pager', 'tag', '--list', '--sort=-taggerdate', '--format=%(refname:strip=2),%(*objectname),%(creatordate:iso-strict)']), this.i17_1);
972
494
  // Inline function 'kotlin.collections.mapNotNull' call
973
495
  // Inline function 'kotlin.collections.mapNotNullTo' call
974
496
  var this_0 = split(outputText, ['\n']);
@@ -982,7 +504,7 @@
982
504
  var commaSplit = split(element, [',']);
983
505
  var tmp;
984
506
  if (commaSplit.l() >= 3) {
985
- tmp = new TagRef(joinToString(commaSplit.z1(0, commaSplit.l() - 2 | 0), ''), reversed(commaSplit).c1(1), Companion_getInstance().n16(last(commaSplit)));
507
+ tmp = new TagRef(joinToString(commaSplit.z1(0, commaSplit.l() - 2 | 0), ''), reversed(commaSplit).c1(1), Companion_getInstance().l16(last(commaSplit)));
986
508
  } else {
987
509
  tmp = null;
988
510
  }
@@ -998,12 +520,36 @@
998
520
  var output = destination;
999
521
  return output;
1000
522
  };
1001
- protoOf(DiggerGitWrapper).n17 = function () {
1002
- return parseLog(this, runProcess(listOf_0(['git', '--no-pager', 'log', '--format=' + this.m17_1]), this.k17_1));
523
+ protoOf(DiggerGitWrapper).l17 = function () {
524
+ return parseLog(this, runProcess(listOf_0(['git', '--no-pager', 'log', '--format=' + this.k17_1]), this.i17_1));
1003
525
  };
1004
- protoOf(DiggerGitWrapper).n18 = function (begin, end) {
1005
- return parseLog(this, runProcess(listOf_0(['git', '--no-pager', 'log', '--format=' + this.m17_1, begin + '..' + end]), this.k17_1));
526
+ protoOf(DiggerGitWrapper).x17 = function (begin, end) {
527
+ return parseLog(this, runProcess(plus(listOf_0(['git', '--no-pager', 'log', '--format=' + this.k17_1, begin]), !(end == null) ? listOf(end) : emptyList()), this.i17_1));
1006
528
  };
529
+ protoOf(DiggerGitWrapper).w17 = function (begin, end, $super) {
530
+ end = end === VOID ? null : end;
531
+ return $super === VOID ? this.x17(begin, end) : $super.x17.call(this, begin, end);
532
+ };
533
+ function alwaysLeftParent(_this__u8e3s4) {
534
+ // Inline function 'kotlin.collections.fold' call
535
+ var accumulator = emptyList();
536
+ var tmp0_iterator = _this__u8e3s4.r();
537
+ while (tmp0_iterator.s()) {
538
+ var element = tmp0_iterator.u();
539
+ // Inline function 'com.zegreatrob.tools.digger.core.alwaysLeftParent.<anonymous>' call
540
+ var acc = accumulator;
541
+ var tmp;
542
+ if (acc.y()) {
543
+ tmp = plus_0(acc, element);
544
+ } else if (element.q17_1 === firstOrNull(last(acc).u17_1)) {
545
+ tmp = plus_0(acc, element);
546
+ } else {
547
+ tmp = acc;
548
+ }
549
+ accumulator = tmp;
550
+ }
551
+ return accumulator;
552
+ }
1007
553
  function MessageDigResult(storyId, ease, coauthors, semver) {
1008
554
  this.j18_1 = storyId;
1009
555
  this.k18_1 = ease;
@@ -1038,12 +584,12 @@
1038
584
  };
1039
585
  function Defaults() {
1040
586
  Defaults_instance = this;
1041
- this.u18_1 = Regex_init_$Create$('\\[major\\]');
1042
- this.v18_1 = Regex_init_$Create$('\\[minor\\]');
1043
- this.w18_1 = Regex_init_$Create$('\\[patch\\]');
1044
- this.x18_1 = Regex_init_$Create$('\\[none\\]');
1045
- this.y18_1 = Regex_init_$Create$('\\[(?<storyId>.*?)\\]');
1046
- this.z18_1 = Regex_init_$Create$('-(?<ease>[1-5])-');
587
+ this.t18_1 = Regex_init_$Create$('\\[major\\]');
588
+ this.u18_1 = Regex_init_$Create$('\\[minor\\]');
589
+ this.v18_1 = Regex_init_$Create$('\\[patch\\]');
590
+ this.w18_1 = Regex_init_$Create$('\\[none\\]');
591
+ this.x18_1 = Regex_init_$Create$('\\[(?<storyId>.*?)\\]');
592
+ this.y18_1 = Regex_init_$Create$('-(?<ease>[1-5])-');
1047
593
  }
1048
594
  var Defaults_instance;
1049
595
  function Defaults_getInstance() {
@@ -1052,12 +598,12 @@
1052
598
  return Defaults_instance;
1053
599
  }
1054
600
  function MessageDigger(majorRegex, minorRegex, patchRegex, noneRegex, storyIdRegex, easeRegex) {
1055
- majorRegex = majorRegex === VOID ? Defaults_getInstance().u18_1 : majorRegex;
1056
- minorRegex = minorRegex === VOID ? Defaults_getInstance().v18_1 : minorRegex;
1057
- patchRegex = patchRegex === VOID ? Defaults_getInstance().w18_1 : patchRegex;
1058
- noneRegex = noneRegex === VOID ? Defaults_getInstance().x18_1 : noneRegex;
1059
- storyIdRegex = storyIdRegex === VOID ? Defaults_getInstance().y18_1 : storyIdRegex;
1060
- easeRegex = easeRegex === VOID ? Defaults_getInstance().z18_1 : easeRegex;
601
+ majorRegex = majorRegex === VOID ? Defaults_getInstance().t18_1 : majorRegex;
602
+ minorRegex = minorRegex === VOID ? Defaults_getInstance().u18_1 : minorRegex;
603
+ patchRegex = patchRegex === VOID ? Defaults_getInstance().v18_1 : patchRegex;
604
+ noneRegex = noneRegex === VOID ? Defaults_getInstance().w18_1 : noneRegex;
605
+ storyIdRegex = storyIdRegex === VOID ? Defaults_getInstance().x18_1 : storyIdRegex;
606
+ easeRegex = easeRegex === VOID ? Defaults_getInstance().y18_1 : easeRegex;
1061
607
  if (!contains(storyIdRegex.d8_1, '?<storyId>')) {
1062
608
  throw RuntimeException_init_$Create$('StoryIdRegex must include a storyId group. The regex was: ' + storyIdRegex.d8_1);
1063
609
  }
@@ -1086,7 +632,7 @@
1086
632
  this.e18_1 = '(' + cleaned(storyIdRegex) + ')?';
1087
633
  this.f18_1 = '(' + cleaned(easeRegex) + ')?';
1088
634
  this.g18_1 = '(Co-authored-by: .* <(?<coAuthors>.*)>)?';
1089
- this.h18_1 = new Regex(this.d18_1 + this.e18_1 + this.f18_1 + this.g18_1, setOf_0([RegexOption_IGNORE_CASE_getInstance(), RegexOption_MULTILINE_getInstance()]));
635
+ this.h18_1 = new Regex(this.d18_1 + this.e18_1 + this.f18_1 + this.g18_1, setOf([RegexOption_IGNORE_CASE_getInstance(), RegexOption_MULTILINE_getInstance()]));
1090
636
  }
1091
637
  protoOf(MessageDigger).i18 = function (input) {
1092
638
  return messageDigResult(this.h18_1.m8(input));
@@ -1222,17 +768,17 @@
1222
768
  return SemverType_Major_instance;
1223
769
  }
1224
770
  function TagRef(name, commitId, dateTime) {
1225
- this.v17_1 = name;
1226
- this.w17_1 = commitId;
1227
- this.x17_1 = dateTime;
771
+ this.n17_1 = name;
772
+ this.o17_1 = commitId;
773
+ this.p17_1 = dateTime;
1228
774
  }
1229
775
  protoOf(TagRef).toString = function () {
1230
- return 'TagRef(name=' + this.v17_1 + ', commitId=' + this.w17_1 + ', dateTime=' + this.x17_1 + ')';
776
+ return 'TagRef(name=' + this.n17_1 + ', commitId=' + this.o17_1 + ', dateTime=' + this.p17_1 + ')';
1231
777
  };
1232
778
  protoOf(TagRef).hashCode = function () {
1233
- var result = getStringHashCode(this.v17_1);
1234
- result = imul(result, 31) + getStringHashCode(this.w17_1) | 0;
1235
- result = imul(result, 31) + this.x17_1.hashCode() | 0;
779
+ var result = getStringHashCode(this.n17_1);
780
+ result = imul(result, 31) + getStringHashCode(this.o17_1) | 0;
781
+ result = imul(result, 31) + this.p17_1.hashCode() | 0;
1236
782
  return result;
1237
783
  };
1238
784
  protoOf(TagRef).equals = function (other) {
@@ -1241,11 +787,11 @@
1241
787
  if (!(other instanceof TagRef))
1242
788
  return false;
1243
789
  var tmp0_other_with_cast = other instanceof TagRef ? other : THROW_CCE();
1244
- if (!(this.v17_1 === tmp0_other_with_cast.v17_1))
790
+ if (!(this.n17_1 === tmp0_other_with_cast.n17_1))
1245
791
  return false;
1246
- if (!(this.w17_1 === tmp0_other_with_cast.w17_1))
792
+ if (!(this.o17_1 === tmp0_other_with_cast.o17_1))
1247
793
  return false;
1248
- if (!this.x17_1.equals(tmp0_other_with_cast.x17_1))
794
+ if (!this.p17_1.equals(tmp0_other_with_cast.p17_1))
1249
795
  return false;
1250
796
  return true;
1251
797
  };