forked from withfig/autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
git.ts
2692 lines (2610 loc) · 89.1 KB
/
git.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
const gitGenerators: Record<string, Fig.Generator> = {
// Commit history
commits: {
script: "git log --oneline",
postProcess: function (out) {
if (out.startsWith("fatal:")) {
return [];
}
return out.split("\n").map((line) => {
return {
name: line.substring(0, 7),
icon: "fig:https://icon?type=node",
description: line.substring(7),
};
});
},
},
// Saved stashes
// TODO: maybe only print names of stashes
stashes: {
script: "git stash list",
postProcess: function (out) {
if (out.startsWith("fatal:")) {
return [];
}
return out.split("\n").map((file) => {
return {
name: file.split(":")[2],
insertValue: file.split(":")[0],
icon: `fig:https://icon?type=node`,
};
});
},
},
// Tree-ish
// This needs to be fleshed out properly....
// e.g. what is difference to commit-ish?
// Refer to this:https://stackoverflow.com/questions/23303549/what-are-commit-ish-and-tree-ish-in-git/40910185
// https://mirrors.edge.kernel.org/pub/software/scm/git/docs/#_identifier_terminology
treeish: {
script: "git diff --cached --name-only",
postProcess: function (out) {
if (out.startsWith("fatal:")) {
return [];
}
return out.split("\n").map((file) => {
return {
name: file,
insertValue: "-- " + file,
icon: `fig:https://icon?type=file`,
description: "staged file",
};
});
},
},
// All branches
branches: {
script: "git branch --no-color",
postProcess: function (out) {
if (out.startsWith("fatal:")) {
return [];
}
return out.split("\n").map((elm) => {
// current branch
if (elm.includes("*")) {
return {
name: elm.replace("*", "").trim(),
description: "current branch",
icon: "⭐️",
// priority: 100,
};
}
return {
name: elm.trim(),
description: "branch",
icon: "fig:https://icon?type=git",
};
});
},
},
remotes: {
script: "git remote -v",
postProcess: function (out) {
const remoteURLs = out.split("\n").reduce((dict, line) => {
const pair = line.split("\t");
const remote = pair[0];
console.log(remote, pair);
const url = pair[1].split(" ")[0];
dict[remote] = url;
return dict;
}, {});
return Object.keys(remoteURLs).map((remote) => {
const url = remoteURLs[remote];
let icon = "box";
if (url.includes("github.com")) {
icon = "github";
}
if (url.includes("gitlab.com")) {
icon = "gitlab";
}
if (url.includes("heroku.com")) {
icon = "heroku";
}
return {
name: remote,
icon: `fig:https://icon?type=${icon}`,
description: "remote",
};
});
},
},
tags: {
script: "git tag --list",
splitOn: "\n",
},
// Files for staging
files_for_staging: {
script: "git status --short",
postProcess: (output, context) => {
if (output.startsWith("fatal:")) {
return [];
}
const items = output.split("\n").map((file) => {
file = file.trim();
const arr = file.split(" ");
return { working: arr[0], file: arr.slice(1).join(" ") };
});
return items.map((item) => {
const file = item.file;
let ext = "";
try {
ext = file.split(".").slice(-1)[0];
} catch (e) {}
if (file.endsWith("/")) {
ext = "folder";
}
return {
name: file,
icon: `fig:https://icon?type=${ext}&color=ff0000&badge=${item.working}`,
description: "Changed file",
// If the current file already is already added
// we want to lower the priority
priority: context.some((ctx) => ctx.includes(file)) ? 50 : 100,
};
});
},
},
getUnstagedFiles: {
script: "git diff --name-only",
splitOn: "\n",
},
};
const head = {
name: "HEAD",
icon: "🔻",
description: "Reset multiple commits",
};
export const completionSpec: Fig.Spec = {
name: "git",
description: "the stupid content tracker",
options: [
{
name: "--version",
description: "Output version",
},
{
name: "--help",
description: "Output help",
},
{
name: "-C",
insertValue: "-C ",
args: {
name: "path",
template: "folders",
},
description: "Run as if git was started in <path>",
},
{
name: "-c name=value",
insertValue: "-c ",
description: "Pass a config parameter to the command",
},
{
name: "--exec-path",
args: {
name: "path",
isOptional: true,
template: "folders",
},
description: "Get or set GIT_EXEC_PATH for core Git programs",
},
{
name: "--html-path",
description: "Print Git’s HTML documentation path",
},
{
name: "--man-path",
description: "Print the manpath for this version of Git",
},
{
name: "--info-path",
description: "Print the info path documenting this version of Git",
},
{
name: ["-p", "--paginate"],
description: "Pipe output into `less` or custom $PAGER",
},
{
name: "--no-pager",
description: "Do not pipe Git output into a pager",
},
{
name: "--no-replace-objects",
description: "Do not use replacement refs",
},
{
name: "--bare",
description: "Treat the repository as a bare repository",
},
{
name: "--git-dir",
args: {
name: "path",
template: "folders",
},
description: "Set the path to the repository dir (`.git`)",
},
{
name: "--work-tree",
args: {
name: "path",
template: "folders",
},
description: "Set working tree path",
},
{
name: "--namespace",
args: {
name: "name",
},
description: "Set the Git namespace",
},
],
subcommands: [
{
name: "commit",
description: "Record changes to the repository",
args: {
name: "pathspec",
isOptional: true,
variadic: true,
template: "filepaths",
},
options: [
{
name: ["-m", "--message"],
insertValue: "-m '{cursor}'",
description: "use the given message as the commit message",
args: {
name: "message",
},
},
{
name: ["-a", "--all"],
description: "stage all modified and deleted paths",
},
{
name: "-am",
insertValue: "-am '{cursor}'",
description: "stage all and use given text as commit message",
args: {
name: "message",
},
},
{
name: ["-v", "--verbose"],
description: "show unified diff of all file changes",
},
{
name: ["-p", "--patch"],
description:
"Use the interactive patch selection interface to chose which changes to commi...",
},
{
name: ["-C", "--reuse-message"],
description:
"Take an existing commit object, and reuse the log message and the authorship ...",
args: [
{
name: "commit",
generators: gitGenerators.commits,
},
],
},
{
name: ["-c", "--reedit-message"],
description:
"Like -C, but with -c the editor is invoked, so that the user can further edit...",
args: [
{
name: "commit",
generators: gitGenerators.commits,
},
],
},
{
name: ["--fixup"],
description:
"Construct a commit message for use with rebase --autosquash. The commit messa...",
args: [
{
name: "commit",
generators: gitGenerators.commits,
},
],
},
{
name: ["--squash"],
description:
"Construct a commit message for use with rebase --autosquash. The commit messa...",
args: [
{
name: "commit",
generators: gitGenerators.commits,
},
],
},
{
name: ["--reset-author"],
description:
"When used with -C/-c/--amend options, or when committing after a conflicting ...",
},
{
name: ["--short"],
description:
"When doing a dry-run, give the output in the short-format. See git-status[1] ...",
},
{
name: ["--branch"],
description:
"Show the branch and tracking info even in short-format.",
},
{
name: ["--porcelain"],
description:
"When doing a dry-run, give the output in a porcelain-ready format. See git-st...",
},
{
name: ["--long"],
description:
"When doing a dry-run, give the output in the long-format. Implies --dry-run.",
},
{
name: ["-z", "--null"],
description:
"When showing short or porcelain status output, print the filename verbatim an...",
},
{
name: ["-F", "--file"],
description:
"Take the commit message from the given file. Use - to read the message from t...",
args: {
name: "file",
template: "filepaths",
},
},
{
name: ["--author"],
description:
"Override the commit author. Specify an explicit author using the standard A U...",
args: {
name: "author",
},
},
{
name: ["--date"],
description: "Override the author date used in the commit.",
args: {
name: "date",
},
},
{
name: ["-t", "--template"],
description:
"When editing the commit message, start the editor with the contents in the gi...",
args: {
name: "file",
template: "filepaths",
},
},
{
name: ["-s", "--signoff"],
description:
"Add a Signed-off-by trailer by the committer at the end of the commit log mes...",
},
{
name: ["--no-signoff"],
description:
"Don't add a Signed-off-by trailer by the committer at the end of the commit l...",
},
{
name: ["-n", "--no-verify"],
description:
"This option bypasses the pre-commit and commit-msg hooks. See also githooks[5].",
},
{
name: ["--allow-empty"],
description:
"Usually recording a commit that has the exact same tree as its sole parent co...",
},
{
name: ["--allow-empty-message"],
description:
"Like --allow-empty this command is primarily for use by foreign SCM interface...",
},
{
name: ["--cleanup"],
description:
"This option determines how the supplied commit message should be cleaned up b...",
args: {
name: "mode",
suggestions: [
"strip",
"whitespace",
"verbatim",
"scissors",
"default",
],
},
},
{
name: ["-e", "--edit"],
description:
"The message taken from file with -F, command line with -m, and from commit ob...",
},
{
name: ["--no-edit"],
description:
"Use the selected commit message without launching an editor. For example, git...",
},
{
name: ["--amend"],
description:
"Replace the tip of the current branch by creating a new commit. The recorded ...",
},
{
name: ["--no-post-rewrite"],
description: "Bypass the post-rewrite hook.",
},
{
name: ["-i", "--include"],
description:
"Before making a commit out of staged contents so far, stage the contents of p...",
},
{
name: ["-o", "--only"],
description:
"Make a commit by taking the updated working tree contents of the paths specif...",
},
{
name: ["--pathspec-from-file"],
description:
"Pathspec is passed in instead of commandline args. If is exactly - then stand...",
args: {
name: "file",
template: "filepaths",
},
},
{
name: ["--pathspec-file-nul"],
description:
"Only meaningful with --pathspec-from-file. Pathspec elements are separated wi...",
},
{
name: ["-u", "--untracked-files"],
description:
"Show untracked files. The mode parameter is optional (defaults to all), and i...",
args: {
name: "mode",
suggestions: ["no", "normal", "all"],
isOptional: true,
},
},
{
name: ["-q", "--quiet"],
description: "Suppress commit summary message.",
},
{
name: ["--dry-run"],
description:
"Do not create a commit, but show a list of paths that are to be committed, pa...",
},
{
name: ["--status"],
description:
"Include the output of git-status[1] in the commit message template when using...",
},
{
name: ["--no-status"],
description:
"Do not include the output of git-status[1] in the commit message template whe...",
},
{
name: ["-S", "--gpg-sign"],
description:
"GPG-sign commits. The keyid argument is optional and defaults to the committe...",
args: {
name: "keyid",
isOptional: true,
},
},
{
name: ["--no-gpg-sign"],
description: "Dont GPG-sign commits.",
},
{
name: ["--"],
description: "Do not interpret any more arguments as options.",
},
],
},
{
name: "config",
description: "set author",
options: [
{
name: "--local",
description: "Default: write to the repository .git/config file",
args: {
variadic: true,
suggestions: [
{
name: "user.name",
description: "set config for username",
insertValue: "user.name '{cursor}'",
},
{
name: "user.email",
description: "set config for email",
insertValue: "user.email '{cursor}'",
},
],
},
},
{
name: "--global",
insertValue: "--global {cursor}",
description:
"For writing options: write to global ~/.gitconfig file rather than the repository .git/config",
args: {
variadic: true,
suggestions: [
{
name: "user.name",
description: "set config for username",
insertValue: "user.name '{cursor}'",
},
{
name: "user.email",
description: "set config for email",
insertValue: "user.email '{cursor}'",
},
],
},
},
{
name: ["--replace-all"],
description:
"Default behavior is to replace at most one line. This replaces all lines matc...",
},
{
name: ["--add"],
description:
"Adds a new line to the option without altering any existing values. This is t...",
},
{
name: ["--get"],
description:
"Get the value for a given key (optionally filtered by a regex matching the va...",
},
{
name: ["--get-all"],
description:
"Like get, but returns all values for a multi-valued key.",
},
{
name: ["--get-regexp"],
description:
"Like --get-all, but interprets the name as a regular expression and writes ou...",
},
{
name: ["--get-urlmatch"],
description:
"When given a two-part name section.key, the value for section..key whose part...",
args: [
{
name: "name",
},
{
name: "url",
},
],
},
{
name: ["--system"],
description:
"For writing options: write to system-wide $(prefix)/etc/gitconfig rather than...",
},
{
name: ["--worktree"],
description:
"Similar to --local except that.git/config.worktree is read from or written to...",
},
{
name: ["-f", "--file"],
description:
"Use the given config file instead of the one specified by GIT_CONFIG.",
args: {
name: "config-file",
template: "filepaths",
},
},
{
name: ["--blob"],
description:
"Similar to --file but use the given blob instead of a file. E.g. you can use ...",
args: {
name: "blob",
},
},
{
name: ["--remove-section"],
description: "Remove the given section from the configuration file.",
},
{
name: ["--rename-section"],
description: "Rename the given section to a new name.",
},
{
name: ["--unset"],
description: "Remove the line matching the key from config file.",
},
{
name: ["--unset-all"],
description: "Remove all lines matching the key from config file.",
},
{
name: ["-l", "--list"],
description:
"List all variables set in config file, along with their values.",
},
{
name: ["--fixed-value"],
description:
"When used with the value-pattern argument, treat value-pattern as an exact st...",
},
{
name: ["--type"],
description:
"git config will ensure that any input or output is valid under the given type...",
args: {
name: "type",
suggestions: [
"bool",
"int",
"bool-or-int",
"path",
"expiry-date",
"color",
],
},
},
{
name: ["--no-type"],
description:
"Un-sets the previously set type specifier (if one was previously set). This o...",
},
{
name: ["-z", "--null"],
description:
"For all options that output values and/or keys, always end values with the nu...",
},
{
name: ["--name-only"],
description:
"Output only the names of config variables for --list or --get-regexp.",
},
{
name: ["--show-origin"],
description:
"Augment the output of all queried config options with the origin type (file, ...",
},
{
name: ["--show-scope"],
description:
"Similar to --show-origin in that it augments the output of all queried config...",
},
{
name: ["--get-colorbool"],
description:
'Find the color setting for name (e.g. color.diff) and output "true" or "false...',
args: {
name: "name",
},
},
{
name: ["--get-color"],
description:
"Find the color configured for name (e.g. color.diff.new) and output it as the...",
args: [
{
name: "name",
},
{
name: "default",
isOptional: true,
},
],
},
{
name: ["-e", "--edit"],
description:
"Opens an editor to modify the specified config file; either --system, --globa...",
},
{
name: ["--includes"],
description:
"Respect include.* directives in config files when looking up values. Defaults...",
},
{
name: ["--no-includes"],
description:
"Respect include.* directives in config files when looking up values. Defaults...",
},
{
name: ["--default"],
description:
"When using --get, and the requested variable is not found, behave as if were ...",
args: {
name: "value",
isOptional: true,
},
},
],
},
{
name: "rebase",
description: "Reapply commits on top of another base tip",
insertValue: "rebase",
options: [
{
name: ["--continue"],
description: "continue the rebasing after conflict resolution",
},
{ name: ["--abort"], description: "stop rebase" },
{ name: ["--skip"], description: "skips a commit" },
{
name: ["-i"],
description: "interactive",
},
],
args: [
{
name: "base",
generators: gitGenerators.branches,
},
{
name: "new base",
generators: gitGenerators.branches,
},
],
},
{
name: "add",
description: "Add file contents to the index",
options: [
{
name: ["-n", "--dry-run"],
description:
"Don’t actually add the file(s), just show if they exist and/or will be ignored.",
},
{ name: ["-v", "--verbose"], description: "Be verbose." },
{
name: ["-f", "--force"],
description: "Allow adding otherwise ignored files.",
},
{
name: ["-i", "--interactive"],
description:
"Add modified contents in the working tree interactively to the index. Optional path arguments may be supplied to limit operation to a subset of the working tree. See “Interactive mode” for details.",
},
{
name: ["-p", "--patch"],
description:
"Interactively choose hunks of patch between the index and the work tree and add them to the index. This gives the user a chance to review the difference before adding modified contents to the index.",
},
{
name: ["-e", "--edit"],
description:
"Open the diff vs. the index in an editor and let the user edit it. After the editor was closed, adjust the hunk headers and apply the patch to the index.",
},
{
name: ["-u", "--update"],
description:
"Update the index just where it already has an entry matching <pathspec>. This removes as well as modifies index entries to match the working tree, but adds no new files.",
},
{
name: ["-A", "--all", "--no-ignore-removal"],
description:
"Update the index not only where the working tree has a file matching <pathspec> but also where the index already has an entry. This adds, modifies, and removes index entries to match the working tree.",
},
{
name: ["--no-all", "--ignore-removal"],
description:
"Update the index by adding new files that are unknown to the index and files modified in the working tree, but ignore files that have been removed from the working tree. This option is a no-op when no <pathspec> is used.",
},
{
name: ["-N", "--intent-to-add"],
description:
"Record only the fact that the path will be added later. An entry for the path is placed in the index with no content. This is useful for, among other things, showing the unstaged content of such files with git diff and committing them with git commit -a.",
},
{
name: ["--refresh"],
description:
"Don’t add the file(s), but only refresh their stat() information in the index.",
},
{
name: ["--ignore-errors"],
description:
"If some files could not be added because of errors indexing them, do not abort the operation, but continue adding the others. The command shall still exit with non-zero status. The configuration variable add.ignoreErrors can be set to true to make this the default behaviour.",
},
{
name: ["--ignore-missing"],
description:
"This option can only be used together with --dry-run. By using this option the user can check if any of the given files would be ignored, no matter if they are already present in the work tree or not.",
},
{
name: ["--no-warn-embedded-repo"],
description:
"By default, git add will warn when adding an embedded repository to the index without using git submodule add to create an entry in .gitmodules. This option will suppress the warning (e.g., if you are manually performing operations on submodules).",
},
{
name: ["--renormalize"],
description:
"Apply the 'clean' process freshly to all tracked files to forcibly add them again to the index. This is useful after changing core.autocrlf configuration or the text attribute in order to correct files added with wrong CRLF/LF line endings. This option implies -u.",
},
{
name: ["--chmod"],
description:
"Override the executable bit of the added files. The executable bit is only changed in the index, the files on disk are left unchanged.",
insertValue: "--chmod=",
args: {
suggestions: ["+x", "-x"],
},
},
{
name: ["--pathspec-from-file"],
description:
"Pathspec is passed in <file> instead of commandline args. If <file> is exactly - then standard input is used. Pathspec elements are separated by LF or CR/LF. Pathspec elements can be quoted as explained for the configuration variable core.quotePath (see git-config[1]). See also --pathspec-file-nul and global --literal-pathspecs.",
args: {
name: "File",
description: "File with pathspec",
template: "filepaths",
},
},
{
name: ["--pathspec-file-nul"],
description:
"Only meaningful with --pathspec-from-file. Pathspec elements are separated with NUL character and all other characters are taken literally (including newlines and quotes).",
},
{
name: "--",
description:
"This option can be used to separate command-line options from the list of files.",
},
],
args: {
name: "pathspec",
variadic: true,
isOptional: true,
// We have a special setting for dot in the vuejs app
// suggestions: [
// {
// name: ".",
// description: "current directory",
// insertValue: ".",
// icon: "fig:https://icon?type=folder"
// }
// ],
generators: gitGenerators.files_for_staging,
},
},
{
name: "status",
description: "Show the working tree status",
options: [
{
name: ["-v", "--verbose"],
description: "be verbose",
},
{
name: ["-b", "--branch"],
description: "show branch information",
},
{
name: "--show-stash",
description: "show stash information",
},
{
name: "--ahead-behind",
description: "compute full ahead/behind values",
},
{
name: "--long",
description: "show status in long format (default)",
},
{
name: ["-z", "--null"],
description: "terminate entries with NUL",
},
{
name: ["-u", "--untracked-files"],
description: "show untracked files",
args: {
suggestions: [
{
name: "all",
description: "(Default)",
},
{
name: "normal",
},
{
name: "no",
},
],
},
},
{
name: "--ignored",
description: "show ignored files",
args: {
suggestions: [
{
name: "traditional",
description: "(Default)",
},
{
name: "matching",
},
{
name: "no",
},
],
},
},
{
name: "--no-renames",
description: "do not detect renames",
},
],
},
{
name: "clean",
description: "Shows which files would be removed from working directory",
options: [
{
name: "-n",
description:
"Don’t actually remove anything, just show what would be done.",
},
{
name: ["-f", "--force"],
description:
"If the Git configuration variable clean.requireForce is not set to false, git clean will refuse to delete files or directories unless given -f or -i.",