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

Re: [PATCH] revision.c: set-up "index_state.repo", don't segfault in pack-objects

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 9, 2022, 16:55 UTC
Message-ID
<xmqqedxpqrvc.fsf@gitster.g>
In-Reply-To
<YvJZCGyhd6KJCabi@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Here's the test addition you mentioned, though I'm really not sure it's
> adding much. The source lines for both the bug/fix and the spot where we
> segfault should be identical between the two cases. It's really just
> about how we ended up calling into the code.

True, but the "non-existing index file" case is rare enough that it would be worth to document the new way to get into the state, I would think.

I am offline every other Tuesday and today is such a day, so please expect no changes to the public repositories.

Thanks.
Show 17 quoted lines
>  t/t7063-status-untracked-cache.sh | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh
> index c1f0d95036..a0e8920ffa 100755
> --- a/t/t7063-status-untracked-cache.sh
> +++ b/t/t7063-status-untracked-cache.sh
> @@ -990,4 +990,9 @@ test_expect_success 'empty repo (no index) and core.untrackedCache' '
>  	git -C emptyrepo -c core.untrackedCache=true write-tree
>  '
>  
> +test_expect_success 'empty worktree and core.untrackedCache' '
> +	git worktree add --no-checkout empty-worktree &&
> +	git -c core.untrackedCache=true gc
> +'
> +
>  test_done
Previous: Jeff King
Message 15 of 15 in “Bugreport: pack-objects died of signal 11”
  1. Paul HornJul 12, 2022
  2. Jeff KingJul 14, 2022
  3. Emily NonemanAug 4, 2022
  4. Derrick StoleeAug 4, 2022
  5. Ævar Arnfjörð BjarmasonAug 4, 2022
  6. Emily NonemanAug 4, 2022
  7. revision.c: set-up "index_state.repo", don't segfault in pack-objectsÆvar Arnfjörð Bjarmason, Aug 5, 2022
  8. Derrick StoleeAug 5, 2022
  9. Jeff KingAug 5, 2022
  10. Junio C HamanoAug 5, 2022
  11. Emily NonemanAug 8, 2022
  12. Jeff KingAug 9, 2022
  13. Junio C HamanoAug 9, 2022
  14. Jeff KingAug 9, 2022
  15. Junio C HamanoAug 9, 2022

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.