git config added
This commit is contained in:
@@ -42,14 +42,30 @@ credentials, SSH keys, pull strategy, and other repository configuration.
|
||||
## Commands
|
||||
|
||||
The package currently registers commands including `status`, `add`, `commit`,
|
||||
`push`, `pull`, `fetch`, `branch`, `switch`, `clone`, `tag`, `log`,
|
||||
`push`, `pull`, `fetch`, `config`, `branch`, `switch`, `clone`, `tag`, `log`,
|
||||
`rev-list`, `diff`, `show`, `grep`, `help`, `version`, and `new-version`.
|
||||
|
||||
Most are also exported as direct procedures such as `git-status`, `git-add`,
|
||||
`git-fetch`, `git-switch`, `git-tag`, `git-log`, `git-diff`, and `git-show`.
|
||||
`git-fetch`, `git-config`, `git-switch`, `git-tag`, `git-log`, `git-diff`, and `git-show`.
|
||||
|
||||
See the Scribble documentation for command-specific behavior and return values.
|
||||
|
||||
## Git configuration
|
||||
|
||||
`git config` has a small Racket-oriented interface:
|
||||
|
||||
```racket
|
||||
(git 'config 'get '--all)
|
||||
(git 'config 'get '--all "credential.helper")
|
||||
(git 'config 'get "credential.helper")
|
||||
(git 'config 'set! "user.email" "hans@example.invalid")
|
||||
(git 'config 'set! '--global "user.email" "hans@example.invalid")
|
||||
```
|
||||
|
||||
`get --all` without a key returns `(key value)` items. `get --all key`
|
||||
returns all values for one key. `get key` returns one string or `#f` when the
|
||||
key is absent. `set!` returns `#t` after a successful write.
|
||||
|
||||
## Low-level Git execution
|
||||
|
||||
`run-git` can be used when direct access to Git's stdin/stdout protocol is
|
||||
|
||||
Reference in New Issue
Block a user