git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] fsck: HEAD is part of refs

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jan 30, 2009, 09:27 UTC
Message-ID
<4982C7FA.20107@viscovery.net>
In-Reply-To
<7veiylb1in.fsf_-_@gitster.siamese.dyndns.org>
Junio C Hamano schrieb:
Show 5 quoted lines
> By default we looked at all refs but not HEAD.  The only thing that
> made fsck not lose sight of comments that are only reachable from a
> detached HEAD was the reflog for the HEAD.
> 
> This fixes it, with a new test.
[...]
Show 9 quoted lines
> +test_expect_success setup '
> +	test_commit A &&
> +	git checkout HEAD^0 &&
> +	test_commit B &&
> +	git reflog expire --expire=now --all
> +'
> +
> +test_expect_success 'HEAD is part of refs' '
> +	test 0 = $(git fsck | wc -l)

I'm scratching my head over this. This test succeeds even without the change... (Tested with a34a9db.)

-- Hannes
Previous: Junio C HamanoNext: Junio C Hamano
Message 20 of 25 in “Something weird is happening...”
  1. H. Peter AnvinJan 29, 2009
  2. Junio C HamanoJan 29, 2009
  3. Sverre RabbelierJan 29, 2009
  4. Junio C HamanoFeb 1, 2009
  5. Ingo MolnarJan 29, 2009
  6. Ingo MolnarJan 29, 2009
  7. Junio C HamanoJan 29, 2009
  8. H. Peter AnvinJan 29, 2009
  9. Ingo MolnarJan 29, 2009
  10. Ingo MolnarJan 29, 2009
  11. H. Peter AnvinJan 29, 2009
  12. Ingo MolnarJan 29, 2009
  13. René ScharfeJan 29, 2009
  14. Daniel BarkalowJan 29, 2009
  15. merge: fix out-of-bounds memory accessRené Scharfe, Jan 31, 2009
  16. H. Peter AnvinJan 29, 2009
  17. Junio C HamanoJan 29, 2009
  18. Linus TorvaldsJan 29, 2009
  19. 1/2 fsck: HEAD is part of refsJunio C Hamano, Jan 30, 2009
  20. Johannes SixtJan 30, 2009
  21. Junio C HamanoFeb 1, 2009
  22. Johannes SchindelinJan 30, 2009
  23. Nanako ShiraishiJan 31, 2009
  24. Junio C HamanoFeb 1, 2009
  25. 2/2 fsck: check loose objects from alternate object stores by defaultJunio C Hamano, Jan 30, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.