Re: Git pull without fetch

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

 



ronan@xxxxxx writes:

> In the scenario described, `git rebase` will always report "Already up to date"
> because the head of the current branch and the head of the remote tracking
> branch are the same. The prefetched reference lives under refs/prefetch/* and is
> unnoticed by git rebase. This is why I used `git update-ref ...` first: to
> update the remote tracking branch from the prefetched copy.

That is very much working as designed.  Prefetching is merely a
performance thing---until the user explicitly says "I want to update
my view of the other side by fetching and updating the remote
tracking branches" with "git fetch", it will not disrupt
refs/remotes/origin/* refs, and because of prefetching, when the
user finally gets around to say that, observation of the other side
with a real fetch would go faster, requiring fewer objects to be
transmit.

And if somebody wants to lie to the system and say "pretend we did
not fetch anything", then yes, _knowing_ that implementation detail
of refs/prefetch/* hierarchy and taking advantage of it by using
"update-ref" would be a way to achieve that.



[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