git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [BUG] fetching sometimes doesn't update refs
@ 2018-07-29 12:19 Jeff King
  2018-07-30 17:53 ` Brandon Williams
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Jeff King @ 2018-07-29 12:19 UTC (permalink / raw)
  To: Brandon Williams; +Cc: git

I've noticed for the past couple of weeks that some of my fetches don't
seem to actually update refs, but a follow-up fetch will. I finally
managed to catch it in the act and track it down. It bisects to your
989b8c4452 (fetch-pack: put shallow info in output parameter,
2018-06-27). 

A reproduction recipe is below. I can't imagine why this repo in
particular triggers it, but it was the one where I initially saw the
problem (and doing a tiny reproduction does not seem to work). I'm
guessing it has something to do with the refs, since the main change in
the offending commit is that we recompute the refmap.

-- >8 --
# clone the repo as it is today
git clone https://github.com/cmcaine/tridactyl.git
cd tridactyl

# roll back the refs so that there is something to fetch
for i in refs/heads/master refs/remotes/origin/master; do
	git update-ref $i $i^
done

# and delete the now-unreferenced objects, pretending we are an earlier
# clone that had not yet fetched
rm -rf .git/logs
git repack -ad

# now fetch; this will get the objects but fail to update refs
git fetch

# and fetching again will actually update the refs
git fetch
-- 8< --

-Peff

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-08-02 16:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-29 12:19 [BUG] fetching sometimes doesn't update refs Jeff King
2018-07-30 17:53 ` Brandon Williams
2018-07-30 22:56 ` [PATCH] transport: report refs only if transport does Jonathan Tan
2018-07-31 19:24   ` Jeff King
2018-07-31 21:38     ` Junio C Hamano
2018-07-31 23:29       ` Jonathan Tan
2018-07-31 23:23     ` Jonathan Tan
2018-08-01 17:18       ` Brandon Williams
2018-08-02 16:30       ` Jeff King
2018-08-01 20:13 ` [PATCH] fetch-pack: unify ref in and out param Jonathan Tan
2018-08-01 21:38   ` Brandon Williams
2018-08-01 22:23     ` Junio C Hamano
2018-08-02 16:40   ` Jeff King

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.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).