git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Frédéric Fort" <fortfrederic@free.fr>
To: git@vger.kernel.org
Subject: Segmentation fault within git read-tree
Date: Sat, 14 Jan 2023 23:14:51 +0100	[thread overview]
Message-ID: <d0f9520d-9ccc-a899-609e-fbbb4529e005@free.fr> (raw)

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


             reply	other threads:[~2023-01-14 22:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-14 22:14 Frédéric Fort [this message]
2023-01-15 11:53 ` Segmentation fault within git read-tree Christian Couder
2023-01-15 18:35   ` Jeff King
2023-01-15 21:49     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d0f9520d-9ccc-a899-609e-fbbb4529e005@free.fr \
    --to=fortfrederic@free.fr \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).