git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Joey Hess <id@joeyh.name>
To: git@vger.kernel.org
Cc: Tao Klerks <tao@klerks.biz>
Subject: git write-tree segfault with core.untrackedCache true and nonexistent index
Date: Fri, 22 Jul 2022 13:24:14 -0400	[thread overview]
Message-ID: <YtrdPguYs3a3xekv@kitenet.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 868 bytes --]

	joey@darkstar:/tmp>git init emptyrepo
	Initialized empty Git repository in /tmp/emptyrepo/.git/
	joey@darkstar:/tmp>cd emptyrepo/
	joey@darkstar:/tmp/emptyrepo>git config core.untrackedCache true
	joey@darkstar:/tmp/emptyrepo>git write-tree
	Segmentation fault

I'm seeing this with git 2.37, 2.37.1, and HEAD. 
2.36.1 does not have the problem. 

Note that the index file does not exist prior to git write-tree in the above
test case. When the index does exist, it doesn't segfault. Before, it would
just generate the empty tree when the index did not exist.

Bisecting, e6a653554bb49c26d105f3b478cbdbb1c0648f65 is the first bad commit
commit e6a653554bb49c26d105f3b478cbdbb1c0648f65
Author: Tao Klerks <tao@klerks.biz>
Date:   Thu Mar 31 16:02:15 2022 +0000

    untracked-cache: support '--untracked-files=all' if configured

-- 
see shy jo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2022-07-22 17:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-22 17:24 Joey Hess [this message]
2022-07-22 19:25 ` git write-tree segfault with core.untrackedCache true and nonexistent index Martin Ågren
2022-07-22 19:41   ` Junio C Hamano
2022-07-22 21:22     ` [PATCH] read-cache: make `do_read_index()` always set up `istate->repo` Martin Ågren
2022-07-22 21:46       ` Junio C Hamano
2022-07-22 22:00         ` Martin Ågren

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=YtrdPguYs3a3xekv@kitenet.net \
    --to=id@joeyh.name \
    --cc=git@vger.kernel.org \
    --cc=tao@klerks.biz \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).