mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 21:59:08 -05:00
etc/committer: Use git plumbing instead of porcelain.
* etc/committer.scm.in (diff-info): Use "git diff-files" instead of "git diff". (old-sexp): Use "git cat-file" instead of "git show". Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
This commit is contained in:
parent
d14f21389c
commit
d375eddda0
1 changed files with 4 additions and 4 deletions
|
@ -89,8 +89,7 @@ (define* (hunk->patch hunk #:optional (port (current-output-port)))
|
||||||
(define (diff-info)
|
(define (diff-info)
|
||||||
"Read the diff and return a list of <hunk> values."
|
"Read the diff and return a list of <hunk> values."
|
||||||
(let ((port (open-pipe* OPEN_READ
|
(let ((port (open-pipe* OPEN_READ
|
||||||
"git" "diff"
|
"git" "diff-files"
|
||||||
"--no-color"
|
|
||||||
"--no-prefix"
|
"--no-prefix"
|
||||||
;; Only include one context line to avoid lumping in
|
;; Only include one context line to avoid lumping in
|
||||||
;; new definitions with changes to existing
|
;; new definitions with changes to existing
|
||||||
|
@ -154,8 +153,9 @@ (define (old-sexp hunk)
|
||||||
corresponding to the top-level definition containing the staged changes."
|
corresponding to the top-level definition containing the staged changes."
|
||||||
;; TODO: We can't seek with a pipe port...
|
;; TODO: We can't seek with a pipe port...
|
||||||
(let* ((port (open-pipe* OPEN_READ
|
(let* ((port (open-pipe* OPEN_READ
|
||||||
"git" "show" (string-append "HEAD:"
|
"git" "cat-file" "-p" (string-append
|
||||||
(hunk-file-name hunk))))
|
"HEAD:"
|
||||||
|
(hunk-file-name hunk))))
|
||||||
(contents (get-string-all port)))
|
(contents (get-string-all port)))
|
||||||
(close-pipe port)
|
(close-pipe port)
|
||||||
(call-with-input-string contents
|
(call-with-input-string contents
|
||||||
|
|
Loading…
Reference in a new issue