git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Segmentation fault within git read-tree
@ 2023-01-14 22:14 Frédéric Fort
  2023-01-15 11:53 ` Christian Couder
  0 siblings, 1 reply; 4+ messages in thread
From: Frédéric Fort @ 2023-01-14 22:14 UTC (permalink / raw)
  To: git

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


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

end of thread, other threads:[~2023-01-15 21:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-14 22:14 Segmentation fault within git read-tree Frédéric Fort
2023-01-15 11:53 ` Christian Couder
2023-01-15 18:35   ` Jeff King
2023-01-15 21:49     ` Junio C Hamano

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 NNTP newsgroup(s).