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

Segmentation fault within git read-tree

From
FFFrédéric Fort <fortfrederic@free.fr>
Date
Jan 14, 2023, 22:14 UTC
Message-ID
<d0f9520d-9ccc-a899-609e-fbbb4529e005@free.fr>
Hello,

I am doing some tests trying to do a sparse checkout of a partial clone within a subtree. However, I get a segfault when trying to run git read-tree as is done by git subtree internally.

Maybe what I am doing isn't supposed to work at all, but I suppose it shouldn't at least cause git read-tree to segfault.

Here should be a MWE to reproduce my error:

# Run this to create the repo that will become your subtree git init subtree.git cd subtree.git touch x y git add . git commit -m "first commit"

# Run this to create the repo that has a sparse checkout of a partial clone within a subtree git init repo cd repo git commit --allow-empty "first commit" git sparse-checkout set "subtree/x" git remote add origin-subtree git@my.server:/with/the/subtree.git git fetch --filter=blob:none origin-subtree git rev-parse --verify "FETCH_HEAD^{commit}" git read-tree --debug-unpack --prefix="subtree" FETCH_HEAD

Yours sincerely, Frédéric Fort

Next: Christian Couder
Message 1 of 4 in “Segmentation fault within git read-tree”
  1. Frédéric FortJan 14, 2023
  2. Christian CouderJan 15, 2023
  3. Jeff KingJan 15, 2023
  4. Junio C HamanoJan 15, 2023

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.