git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug] Segfault in git commit when a hook has a broken shebang
@ 2022-08-05  5:45 Ilya K
  2022-08-05  7:52 ` Đoàn Trần Công Danh
  0 siblings, 1 reply; 5+ messages in thread
From: Ilya K @ 2022-08-05  5:45 UTC (permalink / raw)
  To: git

Hello! I ran into a weird bug just now that is probably easier to show 
than explain:
❯ git init
Initialized empty Git repository in /home/k900/test/.git/
❯ echo '#!/usr/bin/oops' > .git/hooks/pre-commit
❯ chmod +x .git/hooks/pre-commit
❯ touch oops
❯ git add oops
❯ git commit -a
fatal: cannot run .git/hooks/pre-commit: No such file or directory
[1]    24580 segmentation fault (core dumped)  git commit -a
This happens consistently with git 2.37.x, and I don't think it happened 
with git 2.36 or earlier.

I'm not sure if this has been reported already, but a quick search of 
the list archives didn't get me anywhere, so apologies if this is a 
duplicate.
Thanks!


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

end of thread, other threads:[~2022-08-05 16:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-05  5:45 [bug] Segfault in git commit when a hook has a broken shebang Ilya K
2022-08-05  7:52 ` Đoàn Trần Công Danh
2022-08-05  8:04   ` Ævar Arnfjörð Bjarmason
2022-08-05  8:24     ` Ævar Arnfjörð Bjarmason
2022-08-05 16:12       ` Emily Shaffer

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).