aboutsummaryrefslogtreecommitdiff
path: root/guix/channels.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/channels.scm')
-rw-r--r--guix/channels.scm20
1 files changed, 8 insertions, 12 deletions
diff --git a/guix/channels.scm b/guix/channels.scm
index 10f0e3800f..f26ccbc3ae 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -24,6 +24,7 @@
#:autoload (guix git) (update-cached-checkout
url+commit->name
commit-difference
+ repository-info
with-repository)
#:autoload (guix git-authenticate) (authenticate-repository)
#:autoload (guix openpgp) (openpgp-public-key-fingerprint
@@ -207,18 +208,13 @@ introduction, add it."
channel that uses that repository and the commit HEAD currently points to; use
INTRODUCTION as the channel's introduction. Return #f if no Git repository
could be found at DIRECTORY or one of its ancestors."
- (catch 'git-error
- (lambda ()
- (with-repository (repository-discover directory) repository
- (let* ((head (repository-head repository))
- (commit (oid->string (reference-target head))))
- (channel
- (inherit %default-guix-channel)
- (url (repository-working-directory repository))
- (commit commit)
- (branch (reference-shorthand head))
- (introduction introduction)))))
- (const #f)))
+ (let ((directory commit branch (repository-info directory)))
+ (channel
+ (inherit %default-guix-channel)
+ (url directory)
+ (commit commit)
+ (branch branch)
+ (introduction introduction))))
(define-record-type <channel-instance>
(channel-instance channel commit checkout)