-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlog.test.ts
1820 lines (1712 loc) · 64.6 KB
/
log.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import { FsFixtureData, makeFsFixture } from './helpers/makeFsFixture'
import { NotFoundError } from 'git-essentials/errors'
import { expectToFailWithTypeAsync } from './helpers/assertionHelper'
import { log } from 'git-essentials'
import logComplexFsFixtureData from './fixtures/fs/log-complex.json'
import logFileFsFixtureData from './fixtures/fs/log-file.json'
import logFsFixtureData from './fixtures/fs/log.json'
describe('log', () => {
it('HEAD', async () => {
// arrange
const { fs, dir } = await makeFsFixture(logFsFixtureData as FsFixtureData)
// act
const commits = await log({ fs, dir, ref: 'HEAD' })
// assert
expect(commits.length).toBe(5)
expect(commits).toEqual(
[
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "Will Hilton",
"timestamp": 1501475810,
"timezoneOffset": 240
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "Will Hilton",
"timestamp": 1501475810,
"timezoneOffset": 240
},
"gpgsig":
`-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJZfrPiAAoJEJYJuKWSi6a5r7AP/0iG5t9oO4OFkvxCbhUd5fra
Q2Z/ujck0yJFW3xF/2/Rzi/4PZ93RPhwB/JUVa8I9zPi5mVJMV6+ZoqiRLmgMb8g
RJyw5Umi2JxtkpssaVfd7RUzjPiXBl9fb0lYgZttGf/sUXoEAUtX0hCwFqN/jALZ
R+x6DqQy4XPkRpLJtQ/ABIL6dpRWflQVsONE7a4M/PA/dON4JaoCl9NTEsOPDs+J
uY/dus3C8DTa2cdeb5OCxpjG7uQEzhMF7PfO/j+uAMNh96HVLvZGQcomxDzfglph
EbEYm21QnpfmYCddnrM2TM3CsYnLutnk85nfz8JcaO40H2uBoxXf6iJguTUDeDWx
eUDoQNpegfWf2VqoHqsAPamqEDnKt5sWDfx5GLhM7tkbmCDZYKiCIc6YZX2lySlu
plaAg/NuAETtnHknDABWlVz9TQUrW6VG+iseS/rN+ZvxFQHZQvX3pNLigAa5Ey4T
bYTU2r/JAajb+e91tEV52+ZzF7QO5URhDBQkiSurFV830HfBFBel/TcOvzWvsW8l
gaESl+Pz8194Z/fEfIVec8IeLPURpSfOKzRZRbu80qBwgE6IBbhbiveVKE5TmaLO
OgA2QgYxLNoaP6fR0mzBa/XqVZeTTGUrgPpGprP/AktZdl+8hPT2s8TkeO9wAVL2
PwpokxoC+HRjO+bEBAs5
=n8ff
-----END PGP SIGNATURE-----`,
"message": `Update gitignore\n`,
"parent": [
"ae054080bcfd04c84e0820e0cf74b31f4a422d7c",
],
"tree": "24224c8f5d4cb40dc61f4210e7eb2c964f7e2407",
},
"oid": "3c945912219e6fc27a9100bf099687c69c88afed",
"payload":
`tree 24224c8f5d4cb40dc61f4210e7eb2c964f7e2407
parent ae054080bcfd04c84e0820e0cf74b31f4a422d7c
author Will Hilton <wmhilton@gmail.com> 1501475810 -0400
committer Will Hilton <wmhilton@gmail.com> 1501475810 -0400
Update gitignore\n`
},
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "Will Hilton",
"timestamp": 1501475755,
"timezoneOffset": 240
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "Will Hilton",
"timestamp": 1501475755,
"timezoneOffset": 240
},
"gpgsig":
`-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJZfrOrAAoJEJYJuKWSi6a5VWMP/il3myaUFoxh2DaM/1+F5GFC
OdS+jUheAMak+M8s87kGrH8Fhv+q46RpSIrrQoz9COYM0tBFDygn2xiIdoMgqwP+
uSXVRWzawZS+0T0nYIVCZLAN41iniL6um3XopNExpOF6rzsgi5t4s+Ch2fksOhBz
Ze7jVtFOrmd2O9QlofgM9ICXJDJcrFRd9tPSQO9Nu4sJPpZjcYUfIfOcSIvwrB6p
ySR4Kyh9zrNRxxY8LEbcXZGvet2wvmhBV6oQo1Xh++E5xINvcHHNo0frZl+/wSSm
QpVE4ErEOBKYnjFqrtsdra9fmAa30/gl0pC3kBbAYdqbB1k0LgWeBfZ08Lmw5qON
ZEDzm2jV9PFCuDs6DTk20dguyhIQIvSetpM8LEWUpVSUiXMJkJs48TZ5nTry79me
QHf3gGNTZ6TQ9Wnjj7QXplVHFMbUc/9TJkXwQ1yYiRCY4z6g9j75qEZmhmWcUg5G
1wHb2xcx5uNysb8gFJT4Anb1GL9VdNAy82uaEt7OgpaFozLnqS/ZqZljnM4VUY+e
A0/Fw1cirSCuVCboA3pPNFyD5vrQcYU+RYEyxdMCf9BBO1/Zuf2qfsVOcIr3hGB6
EaqfZgz3hL/6DRoaira+wo6vQWDLDfbkKmJTSVTXO/p9gWhOGo2J1w75fJmmwbte
DW9rcJWg376XhOdUJYjl
=kq+d
-----END PGP SIGNATURE-----`,
"message": `Finished implementing fetching trees and blobs from Github API, even if we can't push to it.\n`,
"parent": [
"3e80cede3c2a753a5272ed4d93496b67bb65cb0d",
],
"tree": "6b858a95cc8e87677aff79a645ae178923caa5f5",
},
"oid": "ae054080bcfd04c84e0820e0cf74b31f4a422d7c",
"payload":
`tree 6b858a95cc8e87677aff79a645ae178923caa5f5
parent 3e80cede3c2a753a5272ed4d93496b67bb65cb0d
author Will Hilton <wmhilton@gmail.com> 1501475755 -0400
committer Will Hilton <wmhilton@gmail.com> 1501475755 -0400
Finished implementing fetching trees and blobs from Github API, even if we can't push to it.\n`
},
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "Will Hilton",
"timestamp": 1501462174,
"timezoneOffset": 240
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "Will Hilton",
"timestamp": 1501462174,
"timezoneOffset": 240
},
"gpgsig":
`-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJZfn6eAAoJEJYJuKWSi6a5H/wP/0iG/chGZyd1b0ZIpI43saW9
GzGZsKMgUmCmy+CWPIUDJ5p6p045xBDwRrMqdKPvDsJrpDmcUvV8usbL3nQWKvZj
oeSeOvC4C6yw6k66Zr0YtCrcAjqfAUAsyEdiZ+7JNigDB9MqUufw2sYurlulYtBu
2zv22QIep5AYG0pDhSWFbeNuzesL+uk1sxoGTqQN7ER/qnKPWPQwMBNezpA65a3O
WgH2lnPpyDPc6S356Nkr8f9fvQMxx66vXdR07cIw9gsA6dzgW+aUC9w4rAZ9Afk2
SPsARmm8DH1vwwQMbiVzcKuvZ5/yWpy2XJjR2v/IhtD8dtYZDAlUbq+5jIpS9eoa
046xp7GJ5cawOXhoWJfpvmj9ozFkQA8yZvNQ/DmUX7mrknR3pvOuxKFd/WAHZ0R/
M696r6MIbAWWmy6/g76qcj//oEhlTWiaoxqBL5HNxRIAJzhM8gGBmtv7L+mSxKtb
b5foIdbQZ/s890Cnm632KxTQdPkVwInP7oratrYsvpXoe+X6/EOYvhPZYaFARm+C
KS0bq7XbfGxgswD7/6rOjOL4G3WNs0eBBf4KTOZQ4HLM72cjgcMsSSgHMUarLfCo
KLW+2DEuHJhzF4yBcR9uSUdT0t/BbqXpRwNL0QI8nOKmvbuZqMkDHJZHOCqbjn+8
hkMXWZGGpdRSNcNY9Hw8
=VFL/
-----END PGP SIGNATURE-----`,
"message": `My oh shit moment\n`,
"parent": [
"1c04ba2c3b7c61cdfc0ddc3f9515116bc0e06863",
],
"tree": "d1a3e8c5371d481b54e32916da162e08a87ad294",
},
"oid": "3e80cede3c2a753a5272ed4d93496b67bb65cb0d",
"payload":
`tree d1a3e8c5371d481b54e32916da162e08a87ad294
parent 1c04ba2c3b7c61cdfc0ddc3f9515116bc0e06863
author Will Hilton <wmhilton@gmail.com> 1501462174 -0400
committer Will Hilton <wmhilton@gmail.com> 1501462174 -0400
My oh shit moment\n`
},
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "Will Hilton",
"timestamp": 1501454660,
"timezoneOffset": 240,
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "Will Hilton",
"timestamp": 1501454660,
"timezoneOffset": 240,
},
"gpgsig":
`-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJZfmFEAAoJEJYJuKWSi6a5UeUP/3H2AdaOG5g1awkyHSC7sax9
ZAQZhHumcufXoe4jNlKNogk0SUNud7H9dbhG3D7pbpujrLfjPPQ5rrQ5k2RdbuzR
/YRuPPv9fdukWSCX3tXp63BzeNF18i/scIODgX2tT3RmihRldSWopgGpfRnks9o1
cTAhmhjEIOH2wNki7u0M9WT6ntSUw99kglZ2vQGlExp97NFuVS68LsGjdlOpL/Lx
kYxZUap5NVU1CFQZRgeSKZYKGVanuAbSFrGp5dHdY33YXxUQ2POzzH/sZIRRvnFZ
T11K4AN4O7NhO0nujJS9VDrNgU20Kxwxl9FsVMwjSDdlf8ZROVbkse1U/pGjchwN
V+1j3wMzbu0AHCcqkMB5zny/6fLrZigclOTXgq/zFiwh4FjMYwraGIKIYpTWYQ65
d+BfM3nb7j6otAQvrxiIyNe7dwWPI39OZeFk6krAQNg1Lm1cxWwqWiWgXpZAmQwd
yNlgQ9WLjZqiKUI8uxYJB3IznpDjIvO7t8Fq2EmDF0L4/t2LTD4JIGPOlKBx0Abr
5J9lI+2GLTk1ZRPpDk/7w/UJpSxoeGyo5+bI9RaWQRgzkpSLyPTlvipuBLgZefj2
njEC13b2FdnupU2qhjTqptwh1t5qrOQ4COYehMFJyhHllu/S1gV53pdBQ3N1sw35
R4YVFfBN+FJiRwiGq3vn
=zxDV
-----END PGP SIGNATURE-----`,
"message": `Git init, and parts of git fetch\n`,
"parent": [
"1e40fdfba1cf17f3c9f9f3d6b392b1865e5147b9",
],
"tree": "dd92ed7e55ddc0c74f467a8899cc281d909c6bb9",
},
"oid": "1c04ba2c3b7c61cdfc0ddc3f9515116bc0e06863",
"payload":
`tree dd92ed7e55ddc0c74f467a8899cc281d909c6bb9
parent 1e40fdfba1cf17f3c9f9f3d6b392b1865e5147b9
author Will Hilton <wmhilton@gmail.com> 1501454660 -0400
committer Will Hilton <wmhilton@gmail.com> 1501454660 -0400
Git init, and parts of git fetch\n`,
},
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "Will Hilton",
"timestamp": 1501381894,
"timezoneOffset": 240,
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "Will Hilton",
"timestamp": 1501381894,
"timezoneOffset": 240,
},
"gpgsig":
`-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJZfUUGAAoJEJYJuKWSi6a51VIQAJPwVk7bFWbNoLbi9Hi931k3
E6kGW8JnWwcT6Y7fpm0oNpoXt+UzqJdUhVTi+79ws3yKc0u1cA23nVXDUQYmNBT7
3YkzXP2b6OE8i7n0ffzWbOIwHqWPn7lm0RlssSEYMAwGzDTP4fj2isRCFBqQ2lb3
dqp7ZbzikvkkQONs9AKpE7LpWYTVuyElBwO2RtlIcZQrs29fBxZg4q4fkF+mqOhp
DMWMIvTNeCa35sjmWh4+iPXO2CtoYVKXfCzZStzleeCuwQGRhfCLxrxtcuXOREjG
DilGnCZ0iM9+ClzD4wDUf/aY3F5exyq2oqktIq78EhFvIIozY+gUaTn6zXicr5ud
30QQP063Tf8wC3Cy95aEq9QqLYkMXhOYBDym5fWawEWo7ssmOIW1o0ISfSI8pTVZ
bZr5f9gQZETlTWhSPh5IGqqdHrI2fw5pkmO1N/OEn4L8D7R8josty28V4+wk2gsO
wUSPyBv7EpVx2JtO+9Wu941fZK2qOBBmTjcTYys9PQeY9UHtrTQ3y/1r/qdLpdUH
9HK/x5yNHqpnSATHpRiZnfkvKfaxxwIbaOLBPV8khPa/zu9dD+0WxDXStLVBWfXg
MvYAu4q+mQSgON1Qu+kWg67lNhx//kRH0K+vUMJMIvc8M+yUgkJhRqH/HIEzEcJV
ee4fN2IIWX0CTNr8Fs8a
=0Txp
-----END PGP SIGNATURE-----`,
"message": `Initial commit\n`,
"parent": [],
"tree": "421909592ea5e22c6dda69d1cc85118240478444",
},
"oid": "1e40fdfba1cf17f3c9f9f3d6b392b1865e5147b9",
"payload":
`tree 421909592ea5e22c6dda69d1cc85118240478444
author Will Hilton <wmhilton@gmail.com> 1501381894 -0400
committer Will Hilton <wmhilton@gmail.com> 1501381894 -0400
Initial commit\n`,
},
])
})
it('HEAD depth', async () => {
// arrange
const { fs, dir } = await makeFsFixture(logFsFixtureData as FsFixtureData)
// act
const commits = await log({ fs, dir, ref: 'HEAD', depth: 1 })
// assert
expect(commits.length).toBe(1)
})
it('HEAD since', async () => {
// arrange
const { fs, dir } = await makeFsFixture(logFsFixtureData as FsFixtureData)
// act
const commits = await log({ fs, dir, ref: 'HEAD', since: new Date(1501462174000) })
// assert
expect(commits.length).toBe(2)
})
it('shallow branch', async () => {
// arrange
const { fs, dir } = await makeFsFixture(logFsFixtureData as FsFixtureData)
// act
const commits = await log({ fs, dir, ref: 'origin/shallow-branch' })
// assert
expect(commits).toEqual(
[
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "Will Hilton",
"timestamp": 1502484200,
"timezoneOffset": 240,
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "Will Hilton",
"timestamp": 1502484200,
"timezoneOffset": 240,
},
"gpgsig":
`-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJZjhboAAoJEJYJuKWSi6a5V5UP/040SfemJ13PRBXst2eB59gs
3hPx29DRKBhFtvk+uS+8523/hUfry2oeWWd6YRkcnkxxAUtBnfzVkI9AgRIc1NTM
h5XtLMQubCAKw8JWvVvoXETzwVAODmdmvC4WSQCLu+opoe6/W7RvkrTD0pbkwH4E
MXoha59sIWZ/FacZX6ByYqhFykfJL8gCFvRSzjiqBIbsP7Xq2Mh4jkAKYl5zxV3u
qCk26hnhL++kwfXlu2YdGtB9+lj3pk1NeWqR379zRzh4P10FxXJ18qSxczbkAFOY
6o5h7a/Mql1KqWB9EFBupCpjydmpAtPo6l1Us4a3liB5LJvCh9xgR2HtShR4b97O
nIpXP4ngy4z9UyrXXxxpiQQn/kVn/uKgtvGp8nOFioo61PCi9js2QmQxcsuBOeO+
DdFq5k2PMNZLwizt4P8EGfVJoPbLhdYP4oWiMCuYV/2fNh0ozl/q176HGszlfrke
332Z0maJ3A5xIRj0b7vRNHV8AAl9Dheo3LspjeovP2iycCHFP03gSpCKdLRBRC4T
X10BBFD8noCMXJxb5qenrf+eKRd8d4g7JtcyzqVgkBQ68GIG844VWRBolOzx4By5
cAaw/SYIZG3RorAc11iZ7sva0jFISejmEzIebuChSzdWO2OOWRVvMdhyZwDLUgAb
Qixh2bmPgr3h9nxq2Dmn
=4+DN
-----END PGP SIGNATURE-----`,
"message": `Improve resolveRef to handle more kinds of refs. Add tests\n`,
"parent": [
"b4f8206d9e359416b0f34238cbeb400f7da889a8",
],
"tree": "e0b8f3574060ee24e03e4af3896f65dd208a60cc",
},
"oid": "e10ebb90d03eaacca84de1af0a59b444232da99e",
"payload":
`tree e0b8f3574060ee24e03e4af3896f65dd208a60cc
parent b4f8206d9e359416b0f34238cbeb400f7da889a8
author Will Hilton <wmhilton@gmail.com> 1502484200 -0400
committer Will Hilton <wmhilton@gmail.com> 1502484200 -0400
Improve resolveRef to handle more kinds of refs. Add tests\n`,
},
])
})
it('has correct payloads', async () => {
// arrange
const { fs, dir } = await makeFsFixture(logFsFixtureData as FsFixtureData)
// act
const commits = await log({ fs, dir, ref: 'HEAD' })
// assert
expect(commits.length).toBe(5)
})
it('with complex merging history', async () => {
// arrange
const { fs, dir } = await makeFsFixture(logComplexFsFixtureData as FsFixtureData)
// act
const commits = await log({ fs, dir, ref: 'main' })
// assert
expect(commits).toEqual(
[
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605340,
"timezoneOffset": 240,
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605340,
"timezoneOffset": 240,
},
"message": `Merge branches 'foo' and 'baz'\n`,
"parent": [
"8bb702b66d8def74b2a9642309eb23a5f76779dc",
"ccc9ef071f1b27210fa0df2f8665f4ad550358e8",
"1ce759dd468c1ea830e8befbbdcf79e591346153",
],
"tree": "4b825dc642cb6eb9a060e54bf8d69288fbee4904",
},
"oid": "9eeab5143ea4a6dde4ede004e4882e2467dde340",
"payload":
`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent 8bb702b66d8def74b2a9642309eb23a5f76779dc
parent ccc9ef071f1b27210fa0df2f8665f4ad550358e8
parent 1ce759dd468c1ea830e8befbbdcf79e591346153
author William Hilton <wmhilton@gmail.com> 1528605340 -0400
committer William Hilton <wmhilton@gmail.com> 1528605340 -0400
Merge branches 'foo' and 'baz'\n`,
},
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605325,
"timezoneOffset": 240,
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605325,
"timezoneOffset": 240,
},
"message": `Other sixth commit\n`,
"parent": [
"f1eca35203ee2b578f23e0e7c8b8c2c48927d597",
],
"tree": "4b825dc642cb6eb9a060e54bf8d69288fbee4904",
},
"oid": "8bb702b66d8def74b2a9642309eb23a5f76779dc",
"payload":
`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent f1eca35203ee2b578f23e0e7c8b8c2c48927d597
author William Hilton <wmhilton@gmail.com> 1528605325 -0400
committer William Hilton <wmhilton@gmail.com> 1528605325 -0400
Other sixth commit\n`,
},
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605315,
"timezoneOffset": 240,
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605315,
"timezoneOffset": 240,
},
"message": `Sixth commit\n`,
"parent": [
"f1eca35203ee2b578f23e0e7c8b8c2c48927d597",
],
"tree": "4b825dc642cb6eb9a060e54bf8d69288fbee4904",
},
"oid": "1ce759dd468c1ea830e8befbbdcf79e591346153",
"payload":
`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent f1eca35203ee2b578f23e0e7c8b8c2c48927d597
author William Hilton <wmhilton@gmail.com> 1528605315 -0400
committer William Hilton <wmhilton@gmail.com> 1528605315 -0400
Sixth commit\n`,
},
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605295,
"timezoneOffset": 240,
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605295,
"timezoneOffset": 240,
},
"message": `Fifth commit\n`,
"parent": [
"6cabb8ab77d3fc40858db84416dfd1a41fe1c2fd",
],
"tree": "4b825dc642cb6eb9a060e54bf8d69288fbee4904",
},
"oid": "f1eca35203ee2b578f23e0e7c8b8c2c48927d597",
"payload":
`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent 6cabb8ab77d3fc40858db84416dfd1a41fe1c2fd
author William Hilton <wmhilton@gmail.com> 1528605295 -0400
committer William Hilton <wmhilton@gmail.com> 1528605295 -0400
Fifth commit\n`,
},
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605245,
"timezoneOffset": 240,
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605245,
"timezoneOffset": 240,
},
"message": `Merge branch 'bar' into foo\n`,
"parent": [
"ad5f1992b8ff758bc9fe457acf905093dd75b7b1",
"ec2db34cd04249ea6c31ed6d367656b0f2ab25c6",
],
"tree": "4b825dc642cb6eb9a060e54bf8d69288fbee4904",
},
"oid": "ccc9ef071f1b27210fa0df2f8665f4ad550358e8",
"payload":
`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent ad5f1992b8ff758bc9fe457acf905093dd75b7b1
parent ec2db34cd04249ea6c31ed6d367656b0f2ab25c6
author William Hilton <wmhilton@gmail.com> 1528605245 -0400
committer William Hilton <wmhilton@gmail.com> 1528605245 -0400
Merge branch 'bar' into foo\n`,
},
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605228,
"timezoneOffset": 240,
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605228,
"timezoneOffset": 240,
},
"message": `Other fourth commit\n`,
"parent": [
"b5129e2726d68c93ed09a3eaec9dda5e76fd4a87",
],
"tree": "4b825dc642cb6eb9a060e54bf8d69288fbee4904",
},
"oid": "ec2db34cd04249ea6c31ed6d367656b0f2ab25c6",
"payload":
`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent b5129e2726d68c93ed09a3eaec9dda5e76fd4a87
author William Hilton <wmhilton@gmail.com> 1528605228 -0400
committer William Hilton <wmhilton@gmail.com> 1528605228 -0400
Other fourth commit\n`,
},
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605214,
"timezoneOffset": 240,
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605214,
"timezoneOffset": 240,
},
"message": `Fourth commit\n`,
"parent": [
"c4e447f61fcaf49032265bfe3dea32383339d910",
],
"tree": "4b825dc642cb6eb9a060e54bf8d69288fbee4904",
},
"oid": "ad5f1992b8ff758bc9fe457acf905093dd75b7b1",
"payload":
`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent c4e447f61fcaf49032265bfe3dea32383339d910
author William Hilton <wmhilton@gmail.com> 1528605214 -0400
committer William Hilton <wmhilton@gmail.com> 1528605214 -0400
Fourth commit\n`,
},
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605200,
"timezoneOffset": 240,
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605200,
"timezoneOffset": 240,
},
"message": `Other third commit\n`,
"parent": [
"6cabb8ab77d3fc40858db84416dfd1a41fe1c2fd",
],
"tree": "4b825dc642cb6eb9a060e54bf8d69288fbee4904",
},
"oid": "b5129e2726d68c93ed09a3eaec9dda5e76fd4a87",
"payload":
`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent 6cabb8ab77d3fc40858db84416dfd1a41fe1c2fd
author William Hilton <wmhilton@gmail.com> 1528605200 -0400
committer William Hilton <wmhilton@gmail.com> 1528605200 -0400
Other third commit\n`,
},
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605169,
"timezoneOffset": 240,
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605169,
"timezoneOffset": 240,
},
"message": `Third commit\n`,
"parent": [
"6cabb8ab77d3fc40858db84416dfd1a41fe1c2fd",
],
"tree": "4b825dc642cb6eb9a060e54bf8d69288fbee4904",
},
"oid": "c4e447f61fcaf49032265bfe3dea32383339d910",
"payload":
`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent 6cabb8ab77d3fc40858db84416dfd1a41fe1c2fd
author William Hilton <wmhilton@gmail.com> 1528605169 -0400
committer William Hilton <wmhilton@gmail.com> 1528605169 -0400
Third commit\n`,
},
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605133,
"timezoneOffset": 240,
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605133,
"timezoneOffset": 240,
},
"message": `Second commit\n`,
"parent": [
"4acc58cd881f48c4662c4554ab268e77bcd34b71",
],
"tree": "4b825dc642cb6eb9a060e54bf8d69288fbee4904",
},
"oid": "6cabb8ab77d3fc40858db84416dfd1a41fe1c2fd",
"payload":
`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent 4acc58cd881f48c4662c4554ab268e77bcd34b71
author William Hilton <wmhilton@gmail.com> 1528605133 -0400
committer William Hilton <wmhilton@gmail.com> 1528605133 -0400
Second commit\n`,
},
{
"commit": {
"author": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605128,
"timezoneOffset": 240,
},
"committer": {
"email": "wmhilton@gmail.com",
"name": "William Hilton",
"timestamp": 1528605128,
"timezoneOffset": 240,
},
"message": `Initial commit\n`,
"parent": [],
"tree": "4b825dc642cb6eb9a060e54bf8d69288fbee4904",
},
"oid": "4acc58cd881f48c4662c4554ab268e77bcd34b71",
"payload":
`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
author William Hilton <wmhilton@gmail.com> 1528605128 -0400
committer William Hilton <wmhilton@gmail.com> 1528605128 -0400
Initial commit\n`,
},
])
})
})
describe('log-file', () => {
it('a newly added file', async () => {
// arrange
const { fs, dir } = await makeFsFixture(logFileFsFixtureData as FsFixtureData)
// act
const commits = await log({
fs,
dir,
ref: 'HEAD',
filepath: 'newfile.md',
})
// assert
expect(commits.length).toBe(2)
expect(commits).toEqual(
[
{
"commit": {
"author": {
"email": "araknast@protonmail.com",
"name": "araknast",
"timestamp": 1653969605,
"timezoneOffset": 420,
},
"committer": {
"email": "araknast@protonmail.com",
"name": "araknast",
"timestamp": 1653969605,
"timezoneOffset": 420,
},
"message": "update newfile\n",
"parent": [
"dcb1c5fe6cc28e7757c4bc4d7dbf5b061c38ec48",
],
"tree": "331f342f6e9b38c45e17189691134cb4a72189d2",
},
"oid": "04833cdb10e0f8fa81800cafa98e1381a1c6c58e",
"payload":
`tree 331f342f6e9b38c45e17189691134cb4a72189d2
parent dcb1c5fe6cc28e7757c4bc4d7dbf5b061c38ec48
author araknast <araknast@protonmail.com> 1653969605 -0700
committer araknast <araknast@protonmail.com> 1653969605 -0700
update newfile\n`,
},
{
"commit": {
"author": {
"email": "araknast@protonmail.com",
"name": "araknast",
"timestamp": 1653969041,
"timezoneOffset": 420,
},
"committer": {
"email": "araknast@protonmail.com",
"name": "araknast",
"timestamp": 1653969041,
"timezoneOffset": 420,
},
"message": "add newfile\n",
"parent": [
"18f202dfed5cb66a295dc57f1f4ba1b7f6b74f36",
],
"tree": "59c1caba006bb27077d11f1c0ff7ad3ff4b2b422",
},
"oid": "dcb1c5fe6cc28e7757c4bc4d7dbf5b061c38ec48",
"payload":
`tree 59c1caba006bb27077d11f1c0ff7ad3ff4b2b422
parent 18f202dfed5cb66a295dc57f1f4ba1b7f6b74f36
author araknast <araknast@protonmail.com> 1653969041 -0700
committer araknast <araknast@protonmail.com> 1653969041 -0700
add newfile\n`,
},
])
})
it('a file only', async () => {
// arrange
const { fs, dir } = await makeFsFixture(logFileFsFixtureData as FsFixtureData)
// act
const commits = await log({
fs,
dir,
ref: 'HEAD',
filepath: 'README.md',
})
// assert
expect(commits.length).toBe(3)
expect(commits).toEqual(
[
{
"commit": {
"author": {
"email": "snowyu.lee@gmail.com",
"name": "Riceball LEE",
"timestamp": 1593509836,
"timezoneOffset": -480,
},
"committer": {
"email": "snowyu.lee@gmail.com",
"name": "Riceball LEE",
"timestamp": 1593509836,
"timezoneOffset": -480,
},
"gpgsig":
`-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEdmCAADTKSYRxNh/nEPFehIUsuGgFAl77B8wACgkQEPFehIUs
uGi0CQ//ciB5DDcHppFv1caaOiEYUos8oc871eMMbXtl+y9eTfzN6VEwpXY8matE
3hxMpe4YAUpivfQ3a75d5MEy5iEpF/U9rCkWBlGpdqG3+rvmrvpQXo+PZEzdP84E
7rz1Ue2PnfivXCzo2zvDoyMLWqFbNgxXIwr0ST2SxuBTsVIwF/6y80uXa/8VQXfK
MBCFKKcBK03ruZAWiLIwMNvYTxDIMvupRIN2rzyRpOb8lCSWmyw1/eqzF5soVy62
HraCZlK1iyv9XaL0qn+SlAGYYsJylp8sfLUmU0y2qeEtLYdRLS25yRAK9h7l5RD2
qTmQwPb5vx1ldFALr90qgVZc3j7xI5xnL6UtiMGSoZM+HuJ3eioOisXf0aAaxr6U
ImY98WAIPuAAx6rUhHP27r0w0hDABFZmrMtO7FkH6wcqM2LJIweLGFZtKXePmR14
CH4cQw4ylSjtrcQFguUF7rvz0sX69IeDTTF2ppaH9uQclL+3F0Bj78XiH9Dflx4E
6+HfY98tdLPcjGfcdAguLBbKZslmYz7uUeqvHyrgVER6xMFcrGR7IUPLI0IWjtqY
CL+5+gxD2O4FIUhY2hwISLHx+cWsCsAmiBZKx5OhQeW9nn4D8ex4WQK/go7iCrEe
LnuTba+0qmNBTF7f7a+U0x1ReeipUk19bEuP7P1K7Ppc1C+BYT4=
=nAWS
-----END PGP SIGNATURE-----`,
"message": "feat: update to readme and hi.md\n",
"parent": [
"8e98db35c3e3e01014f78a60786b1b3b96a49960",
],
"tree": "281d4cba64e37323777e7f3ee222d504ed8fa0ea",
},
"oid": "bba48a582aaa7e572c844cf7f42f3cd03eab81f0",
"payload":
`tree 281d4cba64e37323777e7f3ee222d504ed8fa0ea
parent 8e98db35c3e3e01014f78a60786b1b3b96a49960
author Riceball LEE <snowyu.lee@gmail.com> 1593509836 +0800
committer Riceball LEE <snowyu.lee@gmail.com> 1593509836 +0800
feat: update to readme and hi.md\n`,
},
{
"commit": {
"author": {
"email": "snowyu.lee@gmail.com",
"name": "Riceball LEE",
"timestamp": 1593509669,
"timezoneOffset": -480,
},
"committer": {
"email": "snowyu.lee@gmail.com",
"name": "Riceball LEE",
"timestamp": 1593509669,
"timezoneOffset": -480,
},
"gpgsig":
`-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEdmCAADTKSYRxNh/nEPFehIUsuGgFAl77ByUACgkQEPFehIUs
uGjJYQ/9HNh4TJO/V+ckTyMDzf+Z4Aih6ytn63ispZnfbKb5hPEV+eG1HRuPthF4
kNilem8w//QYbllbih9bbw3tKvh2SaWYHIOEDI6eA/1k5Bd0nYLi5HNWZG+bOZNR
XdDI+yPBAQSl4607S2xGeOH7HrSzVSVbheDjNhwYBiRDOvbFxhx3Sc/G+vO8IfdU
MCLzVhwizNNclKIMWKaUSpBpJuqxsRK4oINT8wJQLB4LRQ/M2CXgjSjZt0e9NtFl
+6OxGKBbgioNMg6TXzvmqFJ4eqGk1tgMz/qYX1zjCRR2jZ1g/anht8OJRppdz2/0
k87EN+lLpN5H/Z2tSJMrKBHaCJWo72vrcyQzpLjtVUVdHNdOB66+60yqSDZiz7pc
1ou/9jM3cbtEwtvaD+W/JJvG7ctFOM7efM3iGghW2jccJ7Ku/DIlxwCXE6HNCjDf
azPFqO0Y9fw7ZoJl+D7sotea2xaWMhxspUoHxtnYxah6tzJ6KQ8eZ4GR8FoMw2dj
szUaHVtLRg+Nx/G5YWimOFNUrgA3lQYjh9+fgvodxhIQvd9KVW/qCdX6ZQM9vDXU
o9d+QEdd/hzkMrOEHscT3nqKgeIEj6JSBg27kDraM6L0dAP4wCN/9h2dbR2ke0j2
im+CRYtkgJz5EpJ4uN1B7SDUvdBrjYIzC2Aqiohh6M2ehP1in7g=
=IvVn
-----END PGP SIGNATURE-----`,
"message": "feat: update to README\n",
"parent": [
"533131624898bb8ff588b48c77b26d63e7eb180f",
],
"tree": "2ed69fff23ee6e239744c7277ab80bf40a644ece",
},
"oid": "37c51dcbe78dd2fbdca15cf74c6c540f879a5bbb",
"payload":
`tree 2ed69fff23ee6e239744c7277ab80bf40a644ece
parent 533131624898bb8ff588b48c77b26d63e7eb180f
author Riceball LEE <snowyu.lee@gmail.com> 1593509669 +0800
committer Riceball LEE <snowyu.lee@gmail.com> 1593509669 +0800
feat: update to README\n`,
},
{
"commit": {
"author": {
"email": "snowyu.lee@gmail.com",
"name": "Riceball LEE",
"timestamp": 1593509547,
"timezoneOffset": -480,
},
"committer": {
"email": "snowyu.lee@gmail.com",
"name": "Riceball LEE",
"timestamp": 1593509547,
"timezoneOffset": -480,
},
"gpgsig":
`-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEdmCAADTKSYRxNh/nEPFehIUsuGgFAl77BqsACgkQEPFehIUs
uGj/oRAAmOMhskEjKwcFaEnC7InU/UMd4PHAy3XlKwqUCiQVEJWWi6B81n5IYsWi
mDOKXGYenlYOAf0HFqs7nPBeINDRFQp03d01wZT7JgacpERCvvu53IHLH8ndJehL
MQaRtWV/SpScj4OZH4Wzm6tjB4IBB/agZWM67tU4KKI2i6TOhQw8ktBoXbXGWO9g
OwjHW4mZn5eggIhyNzNKWRwzImopYlcBGqtYil5l4LWXADBfxAYfBCA296HkiD1N
sFzsi5mak7bKyW5/dFI9uP27BQSLLbGdbJIJlkYXi8XIo/sLPJGA0BHuiNLAVXUn
E/CO4hBH/tZtJNk3jg0TPLey4Lh34d3Tw8+6z6CvMKQtZ9JUXy8rAWMvAXg0+YVp
IvT+xA6HxECuBZ6UAYLU1ZHAvQtZch6XhJTirOJ5SMklTNKSiGaCLfDP/iuRWOYo
4x52uwkInIuintkcIZocjwEQ5DsG6jO4ylbwmEaWgpzEuR7xOuIBx38dsCoSDD+D
kyZF7ijammlt5Wc6A2u7ewEgCEy/GMEMJ+hUXqhJJ9Gi2uYU/WmC9GJDqD12JsEa
m6FFvEd+zCH/9K+O5eBUS9WFpiwXPP+amaXGBWkXnlbEYf/j9QemZXi/dkn1qCE7
yM9yzr8Tb0dJWqvovK42AlCuYsZ9BYOBM3zz+pGhpSdES9OYO08=
=/hmk
-----END PGP SIGNATURE-----`,
"message": "first commit\n",
"parent": [],
"tree": "5640888e247e986136d36b1d52a9881abc7170f6",
},
"oid": "8651dcc28c58d96439e99aa2bf239bf2ab238b73",
"payload":
`tree 5640888e247e986136d36b1d52a9881abc7170f6
author Riceball LEE <snowyu.lee@gmail.com> 1593509547 +0800
committer Riceball LEE <snowyu.lee@gmail.com> 1593509547 +0800
first commit\n`,
},
]
)
})
it('a deleted file without force should throw error', async () => {
// arrange
const { fs, dir } = await makeFsFixture(logFileFsFixtureData as FsFixtureData)
// act
const action = async () => {
await log({
fs,
dir,
ref: 'HEAD',
filepath: 'a/b/rm.md',
})
}
// assert
await expectToFailWithTypeAsync(action, NotFoundError)
})
it('a deleted file forced', async () => {
// arrange
const { fs, dir } = await makeFsFixture(logFileFsFixtureData as FsFixtureData)
// act
const commits = await log({
fs,
dir,
ref: 'HEAD',
filepath: 'a/b/rm.md',
force: true,
})
// assert
expect(commits.length).toBe(6)
expect(commits).toEqual(
[
{
"commit": {
"author": {
"email": "snowyu.lee@gmail.com",
"name": "Riceball LEE",
"timestamp": 1593652995,
"timezoneOffset": -480,
},
"committer": {
"email": "snowyu.lee@gmail.com",
"name": "Riceball LEE",
"timestamp": 1593652995,
"timezoneOffset": -480,
},
"gpgsig":
`-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEdmCAADTKSYRxNh/nEPFehIUsuGgFAl79NwMACgkQEPFehIUs
uGh+EA//f+cNby3i8IhD5LL5elmR6qp+KFNLQMEa7nvcUmYQX2Ffx4QAN0WtPQ+O
y6PmrQg5MLfCPzANthY3oKnkvjIYbpnBF2JTeN2HA8mF8/HtGakMfeykkeuaGP6V
Kdk4I2jiXC22g/Zy7VAzbYdJTk96yWw71lpufQa1voy8ykCCu/YgeO4EjQME2RYn
82W9+X4Qxx5bu0C0lKMwfdhAcR/MDTye0jbu33krwnuXsNyA+6OKBIOfIAWK8PWY
iTwvkfQ+61T0dGFAdi8tJCfGZ6JRBf482KHR/gSwmwq59g7quS/snnybB6kGwrqZ
tScHZ6Sy08xHYRbibV8HmOAyIBKZr1ZPtEjBx5Aj6Q4qKsTkZ3Q5ZTTi8Ayhm1SM
y1mJ20d3B0WM9F48w0a8qbKxNn7zefW88QHq3PB6wdGechkZ/Wq0xN2z/h3Sl5W3
ZSmJcvgMFJwc/p7ci2spkR+ibVnFNdvn0xinUvrJGftFuiEqlZfHwo1t6KkmX9st
X7+30WwKmotxgeBfV0g1Br4YpaZTKJc5V2JkU+gtjnIlb/7XU6eWm+vCInad5QdL
NeiYCPsrT9ejboKghAIteNNfiuauiRnpZ/06H5gi2OVeyChA1urD/pKjJyaNllbh
XZTv9Wqzt6oQzR6FV0HH5H9ACqOnCJXsTUoydzt843MFHmPDL0Y=
=77Yr
-----END PGP SIGNATURE-----`,
"message": "redel rm.md\n",
"parent": [
"91e66ded3cee73f5f181fbd0e7a4703f1c12bb9f",
],
"tree": "7ab59df3bfd122ef5d24c70f9c8977f03b35e720",
},
"oid": "9a4eb099547166c9cf28628a127cfc9e59fa4f29",
"payload":
`tree 7ab59df3bfd122ef5d24c70f9c8977f03b35e720
parent 91e66ded3cee73f5f181fbd0e7a4703f1c12bb9f
author Riceball LEE <snowyu.lee@gmail.com> 1593652995 +0800
committer Riceball LEE <snowyu.lee@gmail.com> 1593652995 +0800
redel rm.md\n`,
},
{