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

Re: Bug: Segfault when doing "git diff"

From
MBMathias L. Baumann <mathias.baumann@sociomantic.com>
Date
Oct 28, 2015, 13:35 UTC
Message-ID
<5630CF1B.9000706@sociomantic.com>
In-Reply-To
<5630BE79.40708@gmail.com>

I was using the latest git version 2.6.2 already. I suspect it is due to a .gitconfig. This is what is probably required:

➜  ~  cat .gitconfig
[diff]
     submodule = log
On 28/10/15 13:24, Victor Leschuk wrote:
Show 43 quoted lines
>
>
> On 10/28/2015 02:58 PM, Mathias L. Baumann wrote:
>> Hello dear git devs,
>>
>> I just stumbled upon a segfault when doing just "git diff" in my repo.
>>
>> I managed to create a minimal repo setup where the bug is reproducable.
>>
>> The problem seems to be a mix of having an untracked submodule and
>> having set an alternates file for one submodule.
>>
>> Attached you'll find my setup that will reproduce the problem. Simply
>> run  'git diff' in bugtest1.
>>
>> In case the attachment is refused, I also uploaded it here:
>>
>> http://supraverse.net/bugdemo.tar.gz
>>
>> cheers,
>>
>>     --Marenz
> Hello Marenz,
>
> I have just tried to reproduce segfault with the provided archive:
>
> [del@del-debian bugtest1 (master)]$ git diff
> diff --git a/submodules/bugtest2 b/submodules/bugtest2
> --- a/submodules/bugtest2
> +++ b/submodules/bugtest2
> @@ -1 +1 @@
> -Subproject commit cd0b9ee2946d2df3626943347332a4d86f93b126
> +Subproject commit cd0b9ee2946d2df3626943347332a4d86f93b126-dirty
>
> No segfault occured. I am using
>
> git version 2.6.2.308.g3b8f10c
>
> Could you please specify which version of git you are using and also try
> to reproduce it with latest 2.6.2?
>
> --
> Victor
Previous: Victor LeschukNext: Victor Leschuk
Message 3 of 7 in “Bug: Segfault when doing "git diff"”
  1. Mathias L. BaumannOct 28, 2015
  2. Victor LeschukOct 28, 2015
  3. Mathias L. BaumannOct 28, 2015
  4. Victor LeschukOct 28, 2015
  5. add_submodule_odb: initialize alt_odb list earlierJeff King, Oct 28, 2015
  6. Junio C HamanoOct 28, 2015
  7. Jeff KingOct 28, 2015

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.