diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-05-14 14:39:40 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-14 14:39:41 -0700 |
commit | 35837307586a92c0d510392c2ee66b82fa66d5b5 (patch) | |
tree | 2a98a16a82afd7a147aac3a2112dadd553af5f0d /t | |
parent | The ninth batch (diff) | |
parent | bugreport: collect list of populated hooks (diff) | |
download | tgif-35837307586a92c0d510392c2ee66b82fa66d5b5.tar.xz |
Merge branch 'es/bugreport-with-hooks'
"git bugreport" learned to report enabled hooks in the repository.
* es/bugreport-with-hooks:
bugreport: collect list of populated hooks
Diffstat (limited to 't')
-rwxr-xr-x | t/t0091-bugreport.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t0091-bugreport.sh b/t/t0091-bugreport.sh index 2e73658a5c..526304ff95 100755 --- a/t/t0091-bugreport.sh +++ b/t/t0091-bugreport.sh @@ -57,5 +57,20 @@ test_expect_success 'can create leading directories outside of a git dir' ' nongit git bugreport -o foo/bar/baz ' +test_expect_success 'indicates populated hooks' ' + test_when_finished rm git-bugreport-hooks.txt && + test_when_finished rm -fr .git/hooks && + rm -fr .git/hooks && + mkdir .git/hooks && + for hook in applypatch-msg prepare-commit-msg.sample + do + write_script ".git/hooks/$hook" <<-EOF || return 1 + echo "hook $hook exists" + EOF + done && + git bugreport -s hooks && + grep applypatch-msg git-bugreport-hooks.txt && + ! grep prepare-commit-msg git-bugreport-hooks.txt +' test_done |