[bug] Segfault in git commit when a hook has a broken shebang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux