Config options -c in rebase --continue not passed to prepare-commit-msg hook

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

 



For some reason neither environment variables nor -c is passed to the
prepare-commit-msg hook when rebasing.
Other parameters (e.g. -C /path/to/repo) are passed correctly/it's
running the command in the correct repo

Reproduction:
1) Create a prepare-commit-msg hook with content
echo "prepare-commit-msg hook"
echo "$FOO"
git config --get hooks.foobar
exit 1

2) rebase a branch with conflicts. After resolving a conflict run:
FOO=bar git -c hooks.foobar=hello rebase --continue

The hook is executed but neither $FOO nor the config are set (both
echo an empty line)
Output:
prepare-commit-msg hook



Expected output:
prepare-commit-msg hook
bar
hello

Git 2.51.0




[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