-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocumentation.lisp
563 lines (357 loc) · 11.1 KB
/
documentation.lisp
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
(in-package #:org.shirakumo.legit)
;; low-level.lisp
(docs:define-docs
(function git-add
"git add
See https://git-scm.com/docs/git-add")
(function git-am
"git am
See https://git-scm.com/docs/git-am")
(function git-apply
"git apply
See https://git-scm.com/docs/git-apply")
(function git-archive
"git archive
See https://git-scm.com/docs/git-archive")
(function git-bisect
"git bisect
See https://git-scm.com/docs/git-bisect")
(function git-blame
"git blame
See https://git-scm.com/docs/git-blame")
(function git-branch
"git branch
See https://git-scm.com/docs/git-branch")
(function git-bundle
"git bundle
See https://git-scm.com/docs/git-bundle")
(function git-cat-file
"git cat-file
See https://git-scm.com/docs/git-cat-file")
(function git-checkout
"git checkout
See https://git-scm.com/docs/git-checkout")
(function git-cherry-pick
"git cherry-pick
See https://git-scm.com/docs/git-cherry-pick")
(function git-clean
"git clean
See https://git-scm.com/docs/git-clean")
(function git-clone
"git clone
See https://git-scm.com/docs/git-clone")
(function git-commit
"git commit
See https://git-scm.com/docs/git-commit")
(function git-commit-tree
"git commit-tree
See https://git-scm.com/docs/git-commit-tree")
(function git-config
"git config
See https://git-scm.com/docs/git-config")
(function git-count-objects
"git count-objects
See https://git-scm.com/docs/git-count-objects")
(function git-daemon
"git daemon
See https://git-scm.com/docs/git-daemon")
(function git-describe
"git describe
See https://git-scm.com/docs/git-describe")
(function git-diff
"git diff
See https://git-scm.com/docs/git-diff")
(function git-diff-index
"git diff-index
See https://git-scm.com/docs/git-diff-index")
(function git-fast-import
"git fast-import
See https://git-scm.com/docs/git-fast-import")
(function git-fetch
"git fetch
See https://git-scm.com/docs/git-fetch")
(function git-filter-branch
"git filter-branch
See https://git-scm.com/docs/git-filter-branch")
(function git-for-each-ref
"git for-each-ref
See https://git-scm.com/docs/git-for-each-ref")
(function git-format-patch
"git format-patch
See https://git-scm.com/docs/git-format-patch")
(function git-fsck
"git fsck
See https://git-scm.com/docs/git-fsck")
(function git-gc
"git gc
See https://git-scm.com/docs/git-gc")
(function git-grep
"git grep
See https://git-scm.com/docs/git-grep")
(function git-hash-object
"git hash-object
See https://git-scm.com/docs/git-hash-object")
(function git-help
"git help
See https://git-scm.com/docs/git-help")
(function git-init
"git init
See https://git-scm.com/docs/git-init")
(function git-instaweb
"git instaweb
See https://git-scm.com/docs/git-instaweb")
(function git-log
"git log
See https://git-scm.com/docs/git-log")
(function git-ls-files
"git ls-files
See https://git-scm.com/docs/git-ls-files")
(function git-merge
"git merge
See https://git-scm.com/docs/git-merge")
(function git-merge-base
"git merge-base
See https://git-scm.com/docs/git-merge-base")
(function git-mergetool
"git mergetool
See https://git-scm.com/docs/git-mergetool")
(function git-mv
"git mv
See https://git-scm.com/docs/git-mv")
(function git-pull
"git pull
See https://git-scm.com/docs/git-pull")
(function git-push
"git push
See https://git-scm.com/docs/git-push")
(function git-read-tree
"git read-tree
See https://git-scm.com/docs/git-read-tree")
(function git-rebase
"git rebase
See https://git-scm.com/docs/git-rebase")
(function git-reflog
"git reflog
See https://git-scm.com/docs/git-reflog")
(function git-remote
"git remote
See https://git-scm.com/docs/git-remote")
(function git-request-pull
"git request-pull
See https://git-scm.com/docs/git-request-pull")
(function git-reset
"git reset
See https://git-scm.com/docs/git-reset")
(function git-rev-list
"git rev-list
See https://git-scm.com/docs/git-rev-list")
(function git-rev-parse
"git rev-parse
See https://git-scm.com/docs/git-rev-parse")
(function git-revert
"git revert
See https://git-scm.com/docs/git-revert")
(function git-rm
"git rm
See https://git-scm.com/docs/git-rm")
(function git-send-email
"git send-email
See https://git-scm.com/docs/git-send-email")
(function git-shortlog
"git shortlog
See https://git-scm.com/docs/git-shortlog")
(function git-show
"git show
See https://git-scm.com/docs/git-show")
(function git-show-ref
"git show-ref
See https://git-scm.com/docs/git-show-ref")
(function git-stash
"git stash
See https://git-scm.com/docs/git-stash")
(function git-status
"git status
See https://git-scm.com/docs/git-status")
(function git-submodule
"git submodule
See https://git-scm.com/docs/git-submodule")
(function git-svn
"git svn
See https://git-scm.com/docs/git-svn")
(function git-symbolic-ref
"git symbolic-ref
See https://git-scm.com/docs/git-symbolic-ref")
(function git-tag
"git tag
See https://git-scm.com/docs/git-tag")
(function git-update-index
"git update-index
See https://git-scm.com/docs/git-update-index")
(function git-update-ref
"git update-ref
See https://git-scm.com/docs/git-update-ref")
(function git-update-server-info
"git update-server-info
See https://git-scm.com/docs/git-update-server-info")
(function git-verify-pack
"git verify-pack
See https://git-scm.com/docs/git-verify-pack")
(function git-write-tree
"git write-tree
See https://git-scm.com/docs/git-write-tree"))
;; process.lisp
(docs:define-docs
(variable *git-output*
"The stream to which the standard output of the git process is sent.
Defaults to T, but may be automatically bound by some functions in order to process the output.")
(variable *git-errors*
"The stream to which the error output of the git process is sent.
Defaults to T, but may be automatically bound by some functions in order to process the output.")
(variable *git-input*
"The stream from which the standard input of the git process is taken.
Defaults to NIL.")
(function run-git
"Launches a new git process with the given CMDARGS.
See LEGIT:RUN
See *GIT-OUTPUT*
See *GIT-ERRORS*
See *GIT-INPUT*"))
;; repository.lisp
(docs:define-docs
(type repository
"A class to represent a git repository with.
This is a LOCATION.
See LOCATION
See INIT")
(function clear-cache
"Clears the internal cache on the git repository.
Calling this causes subsequent queries against the repository to actually launch a subprocess.
This should be called whenever the repository on the file system may have been modified in any way.
See REPOSITORY")
(function git-location-p
"Returns T if the given location/path is a, or within a git repository.")
(function init
"Initialises the given repository.
REPOSITORY can be a pathname or repository. Optionally supplied keyword arguments are
by default
IF-DOES-NOT-EXIST ::= :error --- Signal an error if it does not exist.
| :ignore --- Just return a repository instance.
| :create | :init --- Initialise a new, empty repository.
| :clone --- Clone a new repository from a remote.
REMOTE --- An optional remote path used to clone the repository, if
IF-DOES-NOT-EXIST is :CLONE
BRANCH --- The branch to use if IF-DOES-NOT-EXIST is :CLONE, :CREATE, or
:INIT.
BARE --- Whether the repository should be bare if IF-DOES-NOT-EXIST is
:CLONE, :CREATE, or :INIT.
See REPOSITORY
See GIT-INIT
See GIT-CHECKOUT
See GIT-CLONE")
(function clone
"Clone a repository from FROM to TO.
Default extra keyword arguments are BRANCH and BARE.
See GIT-CLONE")
(function fetch
"Fetch the latest commits from upstream.
This clears the cache.
See GIT-FETCH
See REPOSITORY
See CLEAR-CACHE")
(function pull
"Pull and merge the latest commits from upstream.
This clears the cache.
See GIT-PULL
See REPOSITORY
See CLEAR-CACHE")
(function checkout
"Checks out a specific THING in the repository.
This clears the cache.
See GIT-CHECKOUT
See REPOSITORY
See CLEAR-CACHE")
(function reset
"Resets changes in the repository.
Default extra keyword arguments are TO, HARD, MIXED, SOFT.
This clears the cache.
See GIT-RESET
See REPOSITORY
See CLEAR-CACHE")
(function clean
"Cleans the repository out.
Default extra keyword arguments are DIRECTORIES, FORCE, IGNORED.
See GIT-CLEAN
See REPOSITORY")
(function git-value
"Shorthand macro to handle caching of the value from the git process under NAME.")
(function commits
"Returns the full list of commit hashes on the repository.
See GIT-REV-LIST
See REPOSITORY")
(function submodules
"Returns a list of REPOSITORY instances that represent the submodules of REPOSITORY.
See GIT-SUBMODULE
See REPOSITORY")
(function map-submodules
"Maps FUNCTION over all submodules of REPOSITORY.
See SUBDMODULES
See REPOSITORY")
(function do-submodules
"Iterates over all submodules of REPOSITORY.
See MAP-SUBMODULES
See REPOSITORY")
(function remotes
"Returns an alist of all remotes on the REPOSITORY. The CAR is the name, the CDR the address.
This function is SETF-able, meaning you can PUSH new remotes to it or remove
remotes by SETF&REMOVE. It will also gracefully change the address of a remote
if it is changed in the setted list.
Setting REMOTES clears the cache.
See GIT-REMOTE
See REPOSITORY
See CLEAR-CACHE")
(function commit-age
"Returns a universal-time timestamp of when the given commit was made.
See GIT-LOG
See REPOSITORY")
(function current-commit
"Returns the latest commit hash on the current branch of the REPOSITORY.
See GIT-REV-PARSE
See REPOSITORY")
(function current-branch
"Returns the currently checked out branch of the REPOSITORY.
See GIT-REV-PARSE
See REPOSITORY")
(function current-message
"Returns the latest commit's message on the current branch of the REPOSITORY.
See GIT-LOG
See REPOSITORY")
(function current-age
"Returns the latest commit's age on the current branch of the REPOSITORY as a universal-time timestamp.
See GIT-LOG
See REPOSITORY")
(function remote-url
"Returns the address of a remote (default \"origin\") on the REPOSITORY.
Accepts a default keyword argument REMOTE.
See GIT-CONFIG
See REPOSITORY")
(function default-remote
"Returns a suitable default remote name.
Will get the branch's configured remote, if any, or fall back to the
first available remote.
See REPOSITORY")
(function bare-p
"Returns T if the REPOSITORY is bare.
See GIT-REV-PARSE
See REPOSITORY")
(function branches
"Returns a list of branch names for REPOSITORY.
See GIT-BRANCH
See REPOSITORY")
(function tags
"Returns a list of tag names for REPOSITORY.
See GIT-TAG
See REPOSITORY"))
;; toolkit.lisp
(docs:define-docs
(function relative-dir
"Get a directory pathname that is SUBDIRS beneath RELATIVE."))