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

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

 



On Mon, 9 Jun 2025 at 15:08, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> M Hickford <mirth.hickford@xxxxxxxxx> writes:
>
> > 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?
>
> I _think_ that it uses "git fetch --prefetch" to store what is
> usually stored at refs/$R to refs/prefetch/$R (so your
> remote-tracking branch refs/remotes/origin/frotz is stored at
> refs/prefetch/remotes/origin/frotz instead), so I would presume that
> it should be the matter of doing something silly like this:
>
>     $ git fetch . 'refs/prefetch/remotes/origin/*:refs/remotes/origin/*'
>

Thanks, that worked.

To support Git users with sporadic connectivity, might it be useful to
add an option to git fetch? Perhaps  `git fetch --offline` or `git
fetch --complete-prefetch`?

https://git-scm.com/docs/git-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