forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Milestone
Description
Setup
- Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options
git version 2.17.0.windows.1
cpu: x86_64
built from commit: e7621d891d081acff6acd1f0ba6ae0adce06dd09
sizeof-long: 4
- Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver
Microsoft Windows [Version 10.0.17134.112]
- What options did you set as part of the installation? Or did you choose the
defaults?
Portable version.
- Any other interesting things about your environment that might be related
to the issue you're seeing?
Hopefully, no.
Details
- Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
Bash.
- What commands did you run to trigger this issue? If you can provide a
Minimal, Complete, and Verifiable example
this will help us understand the issue.
mkdir foo
cd foo
git init
# set up a commit-msg hook that appends "The End" to commit messages
echo -e '#!/bin/sh\necho "The End" >> "$1"' > .git/hooks/commit-msg
touch file
git add file
git gui # commit; the commit-msg hook runs
# another commit, this time from a worktree
git branch master2
git worktree add ../foo-worktree master2
cd ../foo-worktree
echo "some change" >> file
git add file
git gui # commit; the commit-msg hook does NOT run
- What did you expect to occur after running these commands?
I expected the commit created in foo-worktree
would have "The End" appended by the commit-msg hook.
- What actually happened instead?
The commit-msg hook appears to not have been executed. The commit message does not end with "The End".
Metadata
Metadata
Assignees
Labels
No labels