From: Simon Tournier <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 65787@debbugs.gnu.org
Subject: bug#65787: time-machine is doing too much network requests
Date: Mon, 11 Sep 2023 13:36:40 +0200 [thread overview]
Message-ID: <874jk1j60n.fsf@gmail.com> (raw)
In-Reply-To: <87tts1jbbx.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 233 bytes --]
Oops, missing diff for clarity. :-)
On Mon, 11 Sep 2023 at 11:41, Simon Tournier <zimon.toutoune@gmail.com> wrote:
> If yes, here two examples:
Adding ’pk’ where ’remote-fetch’ and ’branch-lookup’ are called.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: p.patch --]
[-- Type: text/x-diff, Size: 1371 bytes --]
diff --git a/guix/git.scm b/guix/git.scm
index 1cb87a45607b..0209826c5c00 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -234,8 +234,10 @@ (define (resolve-reference repository ref)
(let resolve ((ref ref))
(match ref
(('branch . branch)
- (let ((oid (reference-target
- (branch-lookup repository branch BRANCH-REMOTE))))
+ (let ((oid (begin
+ (pk 'branch-lookup 'NETWORK)
+ (reference-target
+ (branch-lookup repository branch BRANCH-REMOTE)))))
(object-lookup repository oid)))
(('symref . symref)
(let ((oid (reference-name->oid repository symref)))
@@ -483,8 +485,10 @@ (define* (update-cached-checkout url
;; Only fetch remote if it has not been cloned just before.
(when (and cache-exists?
(not (reference-available? repository ref)))
- (remote-fetch (remote-lookup repository "origin")
- #:fetch-options (make-default-fetch-options)))
+ (begin
+ (pk 'remote-fetch 'NETWORK)
+ (remote-fetch (remote-lookup repository "origin")
+ #:fetch-options (make-default-fetch-options))))
(when recursive?
(update-submodules repository #:log-port log-port
#:fetch-options (make-default-fetch-options)))
[-- Attachment #3: Type: text/plain, Size: 15 bytes --]
Cheers,
simon
prev parent reply other threads:[~2023-09-11 11:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-06 16:26 bug#65787: time-machine is doing too much network requests Simon Tournier
2023-09-10 20:10 ` Ludovic Courtès
2023-09-11 9:41 ` Simon Tournier
2023-09-11 11:36 ` Simon Tournier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874jk1j60n.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=65787@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).