Re: Fetch remote only if remote hasn't been fetched recently

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 5 Jun 2025 at 17:55, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> M Hickford <mirth.hickford@xxxxxxxxx> 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.

Interesting, thank you.

Suppose my network connection is intermittent. While the machine is
online, `git fetch --prefetch` runs successfully. Later I am offline.
How can I complete the fetch?




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux