From: Junio C Hamano <gitster@pobox.com>
To: M Hickford <mirth.hickford@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Fetch remote only if remote hasn't been fetched recently
Date: Thu, 05 Jun 2025 09:55:21 -0700 [thread overview]
Message-ID: <xmqqtt4u86x2.fsf@gitster.g> (raw)
In-Reply-To: <CAGJzqskDumbMSbC3rdYT8fZ8gNJ5MOjR_o8RAo9QS-nuvbBinQ@mail.gmail.com> (M. Hickford's message of "Thu, 5 Jun 2025 12:16:26 +0100")
M Hickford <mirth.hickford@gmail.com> writes:
> Hi. I'd like to fetch from a particular remote, but only if that
> remote hasn't been fetched in the last hour. How could I achieve this?
> Is there a relevant option for `git fetch`?
>
> https://git-scm.com/docs/git-fetch
"git fetch" is "I want to fetch now". If you want to pace your
fetches, you have to keep a record of when you fetched in the past
and work from there.
I sense there perhaps is an XY problem?
If "git fetch" is done outside end-user's supervision and explicit
intent, the remote-tracking branches will become much less useful to
the human users. A good solusion that avoids this issue already
exists as the "prefetch" task of the "git maintenance" suite.
next prev parent reply other threads:[~2025-06-05 16:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAGJzqs=kJtPcMrWC8Dayd+VW7BvC1rmzS0zT+EwQXfLOpZ3Tfg@mail.gmail.com>
2025-06-05 11:16 ` Fetch remote only if remote hasn't been fetched recently M Hickford
2025-06-05 14:02 ` Konstantin Ryabitsev
2025-06-05 16:55 ` Junio C Hamano [this message]
2025-06-07 7:00 ` M Hickford
2025-06-09 14:08 ` Junio C Hamano
2025-06-11 7:00 ` M Hickford
2025-06-11 15:23 ` Junio C Hamano
2025-07-01 7:00 ` M Hickford
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqtt4u86x2.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mirth.hickford@gmail.com \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.