stdin processing for run-git
This commit is contained in:
@@ -251,3 +251,21 @@ Updates the version in @filepath{info.rkt}. The kind is @racket['major],
|
||||
@racket['minor], or @racket['patch], with @racket['maj] and @racket['min] as
|
||||
abbreviations. The result is the new version as a list of three integers.
|
||||
}
|
||||
|
||||
|
||||
@section{Low-level Git execution}
|
||||
|
||||
@defproc[(run-git [args list?]
|
||||
[#:input input (or/c #f string?) #f])
|
||||
(values exact-integer? list?)]{
|
||||
Runs Git without interactive terminal prompts. When @racket[input] is a string,
|
||||
it is written to Git's standard input before that input port is closed.
|
||||
|
||||
The procedure returns two values: Git's exit code and the ordered output items,
|
||||
where each item identifies either @racket['stdout] or @racket['stderr].
|
||||
|
||||
@racketblock[
|
||||
(run-git '(credential fill)
|
||||
#:input "protocol=https\nhost=git.dijkewijk.nl\n\n")
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user