Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: "Jim Pryor" <dubiousjim@gmail.com>
To: git@vger.kernel.org
Subject: git 2.40.1 tree-diff crashes with (glob) magic on pathspecs
Date: Sat, 27 May 2023 15:53:31 +0200	[thread overview]
Message-ID: <c2b73d05-1214-4e30-bab6-14e0b8d69773@app.fastmail.com> (raw)

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)

$ mkdir test2
$ cd test2
$ git init
Initialized empty Git repository in /Users/jim/repo/test2/.git/
$ mkdir -p foo/bar
$ touch foo/bar/test
$ git add foo/bar/test
$ git commit -m "first commit" -u
[master (root-commit) c6eb1c1] first commit
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 foo/bar/test
$ git mv foo/bar/test foo/bar/test2
$ git commit -m "second commit" -u
[master 2bacc0c] second commit
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename foo/bar/{test => test2} (100%)
$ echo "contents" > foo/bar/test2
$ git commit -m "third commit" -a
[master 13a1b11] third commit
 1 file changed, 1 insertion(+)

$ git --no-pager log --oneline -- ':(glob)**/test2'

What did you expect to happen? (Expected behavior)

13a1b11 (HEAD -> master) third commit
2bacc0c second commit
c6eb1c1 first commit

What happened instead? (Actual behavior)

13a1b11 (HEAD -> master) third commit
BUG: tree-diff.c:596: unsupported magic 8
error: git died of signal 6

What's different between what you expected and what actually happened?

git tree-diff crashed

Anything else you want to add:

* Also get the crashes with ':(glob)*/bar/test2' and ':(glob)foo/*/test2'.
* The `git mv` does not seem to be necessary to reproduce.

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.40.1
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Darwin 19.6.0 Darwin Kernel Version 19.6.0: Tue Jun 21 21:18:39 PDT 2022; root:xnu-6153.141.66~1/RELEASE_X86_64 x86_64
compiler info: clang: 12.0.0 (clang-1200.0.32.29)
libc info: no libc information available
$SHELL (typically, interactive shell): /bin/bash


[Enabled Hooks]

-- 
dubiousjim@gmail.com

             reply	other threads:[~2023-05-27 14:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-27 13:53 Jim Pryor [this message]
2023-05-27 17:39 ` git 2.40.1 tree-diff crashes with (glob) magic on pathspecs Jeff King
2023-05-27 19:00   ` Jim Pryor
2023-06-01 17:37     ` [PATCH 0/3] handling pathspec magic with --follow Jeff King
2023-06-01 17:38       ` [PATCH 1/3] pathspec: factor out magic-to-name function Jeff King
2023-06-01 17:41       ` [PATCH 2/3] diff: factor out --follow pathspec check Jeff King
2023-06-01 17:43       ` [PATCH 3/3] diff: detect pathspec magic not supported by --follow Jeff King
2023-06-02  7:27         ` Junio C Hamano
2023-06-15  7:26           ` Jeff King
2023-06-15 19:00             ` Junio C Hamano
2023-06-01  5:38   ` git 2.40.1 tree-diff crashes with (glob) magic on pathspecs Junio C Hamano
2023-06-01 13:30     ` Jeff King

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=c2b73d05-1214-4e30-bab6-14e0b8d69773@app.fastmail.com \
    --to=dubiousjim@gmail.com \
    --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 read-only IMAP folder(s) and NNTP newsgroup(s).