git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Re: Bug in "revision.c: --all adds HEAD from all worktrees" ?
@ 2018-03-13 18:23 Stan Hu
  2018-03-13 20:29 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 11+ messages in thread
From: Stan Hu @ 2018-03-13 18:23 UTC (permalink / raw)
  To: avarab; +Cc: git, gitster, luke, pclouds

To be clear, this is how I think we got into this state:

We have worktrees that are created to squash and rebase a branch. They were left around inadvertently for one reason or another.

Since we were using git v2.14.3, a git gc would prune dangling objects because it never saw that a worktree still had a reference to it. Now, in git v2.15+, worktrees are examined, and a git gc won't garbage collect any objects referenced by a worktree.

Another words, the failure of git v2.14 to preserve these objects caused problems with these stale worktrees with the upgrade to v2.15+.


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Bug in "revision.c: --all adds HEAD from all worktrees" ?
@ 2017-11-13 19:51 Luke Diamand
  2017-11-13 22:03 ` Luke Diamand
  0 siblings, 1 reply; 11+ messages in thread
From: Luke Diamand @ 2017-11-13 19:51 UTC (permalink / raw)
  To: Git Users; +Cc: Duy Nguyen

Hi!

I think there may be a regression caused by this change which means
that "git fetch origin" doesn't work:

commit d0c39a49ccb5dfe7feba4325c3374d99ab123c59 (refs/bisect/bad)
Author: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date:   Wed Aug 23 19:36:59 2017 +0700

    revision.c: --all adds HEAD from all worktrees

$ git fetch origin
fatal: bad object HEAD
error: ssh://my_remote_host/reponame did not send all necessary objects

I used git bisect to find the problem, and it seems pretty consistent.
"git fetch" with the previous revision works fine.

FWIW, I've got a lot of git worktrees associated with this repo, so
that may be why it's failing. The remote repo is actually a git-p4
clone, so HEAD there actually ends up pointing at
refs/remote/p4/master.

Thanks,
Luke

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

end of thread, other threads:[~2018-03-13 20:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-13 18:23 Bug in "revision.c: --all adds HEAD from all worktrees" ? Stan Hu
2018-03-13 20:29 ` Ævar Arnfjörð Bjarmason
  -- strict thread matches above, loose matches on Subject: below --
2017-11-13 19:51 Luke Diamand
2017-11-13 22:03 ` Luke Diamand
2017-11-13 22:15   ` Stefan Beller
2017-11-15 21:38     ` Luke Diamand
2017-11-17 22:03       ` Jeff King
2017-11-15 22:08   ` Junio C Hamano
2017-11-16  1:06     ` Luke Diamand
2018-03-12 21:39       ` Ævar Arnfjörð Bjarmason
2018-03-13 11:22         ` Duy Nguyen

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).