GNU bug report logs -
#74552
[PATCH 0/3] Small changes for running qa-frontpage locally
Previous Next
Reported by: Noé Lopez <noe <at> xn--no-cja.eu>
Date: Tue, 26 Nov 2024 22:55:02 UTC
Severity: normal
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
From: Noé Lopez <noelopez <at> free.fr>
---
guix-qa-frontpage/git-repository.scm | 12 +++++++++---
guix-qa-frontpage/manage-patch-branches.scm | 6 +++---
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/guix-qa-frontpage/git-repository.scm b/guix-qa-frontpage/git-repository.scm
index 2140c1e..0d31fe6 100644
--- a/guix-qa-frontpage/git-repository.scm
+++ b/guix-qa-frontpage/git-repository.scm
@@ -16,6 +16,7 @@
#:export (%git-repository-location
ensure-repository-exists!
+ fetch-remote!
update-repository!
with-bare-git-repository
with-git-worktree
@@ -55,13 +56,18 @@
(invoke "git" "config" "user.name" "Guix Patches Tester")
(invoke "git" "config" "user.email" "")))))))
+(define* (fetch-remote! remote #:rest additional-args)
+ (let ((args `("git" "fetch" "--prune"
+ ,@additional-args ,remote)))
+ (apply invoke args)))
+
(define (update-repository!)
(with-bare-git-repository
(lambda ()
(invoke "git" "prune")
- (invoke "git" "fetch" "--prune" "origin")
- (invoke "git" "fetch" "--prune" "patches")
- (invoke "git" "fetch" "--force" "--tags" "patches"))))
+ (fetch-remote! "origin")
+ (fetch-remote! "patches")
+ (fetch-remote! "patches" "--force" "--tags"))))
(define (with-bare-git-repository thunk)
(ensure-repository-exists!)
diff --git a/guix-qa-frontpage/manage-patch-branches.scm b/guix-qa-frontpage/manage-patch-branches.scm
index fc389e1..b725113 100644
--- a/guix-qa-frontpage/manage-patch-branches.scm
+++ b/guix-qa-frontpage/manage-patch-branches.scm
@@ -64,7 +64,7 @@
(with-bare-git-repository
(lambda ()
- (run "git" "fetch" "--prune" "patches")
+ (fetch-remote! "origin")
(let ((pipe (open-pipe* OPEN_READ
"git" "ls-remote" "--heads" "patches")))
@@ -142,7 +142,7 @@
latest-processed-master-revision
(with-bare-git-repository
(lambda ()
- (invoke "git" "fetch" "--prune" "origin")
+ (fetch-remote! "origin")
(invoke-read-line "git" "show-ref" "--hash"
(string-append "origin/" branch)))))))
@@ -262,7 +262,7 @@
(begin
(with-bare-git-repository
(lambda ()
- (invoke "git" "fetch" "--prune" "origin")
+ (fetch-remote! "origin")
(system* "git" "worktree" "remove" "--force"
(simple-format #f "../issue-~A" issue-number))
(system* "git" "branch" "-D"
--
2.46.0
This bug report was last modified 85 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.