summaryrefslogtreecommitdiff
path: root/guix/scripts/pull.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-07-06 10:10:01 +0200
committerLudovic Courtès <ludo@gnu.org>2020-07-11 11:51:56 +0200
commit69db2993b58579e7b0990f5c35f9a289844f22e5 (patch)
tree0077b6ec7b821ae87620def2e55295a2b46a228c /guix/scripts/pull.scm
parent4b9b8b2ec23e59af2275a6d2829e6e0f915b44b3 (diff)
downloadguix-patches-69db2993b58579e7b0990f5c35f9a289844f22e5.tar
guix-patches-69db2993b58579e7b0990f5c35f9a289844f22e5.tar.gz
git: Add 'with-git-error-handling'.
* guix/scripts/pull.scm (report-git-error, with-git-error-handling): Move to... * guix/git.scm: ... here. * guix/scripts/time-machine.scm: Adjust accordingly.
Diffstat (limited to 'guix/scripts/pull.scm')
-rw-r--r--guix/scripts/pull.scm18
1 files changed, 0 insertions, 18 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index f953957161..807daec593 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -63,7 +63,6 @@
#:re-export (display-profile-content
channel-commit-hyperlink)
#:export (channel-list
- with-git-error-handling
guix-pull))
@@ -464,23 +463,6 @@ true, display what would be built without actually building it."
(unless (honor-system-x509-certificates!)
(honor-lets-encrypt-certificates! store)))
-(define (report-git-error error)
- "Report the given Guile-Git error."
- ;; Prior to Guile-Git commit b6b2760c2fd6dfaa5c0fedb43eeaff06166b3134,
- ;; errors would be represented by integers.
- (match error
- ((? integer? error) ;old Guile-Git
- (leave (G_ "Git error ~a~%") error))
- ((? git-error? error) ;new Guile-Git
- (leave (G_ "Git error: ~a~%") (git-error-message error)))))
-
-(define-syntax-rule (with-git-error-handling body ...)
- (catch 'git-error
- (lambda ()
- body ...)
- (lambda (key err)
- (report-git-error err))))
-
;;;
;;; Profile.