Thread (2 messages) 2 messages, 2 authors, 2020-08-02

amend param not available to the pre-commit hook

From: Andrea Wyss <hidden>
Date: 2020-08-02 13:22:53

Issue
amend param not available to the pre-commit hook

Problem
Cannot write a pre-commit hook that stops amending a commit that is present in other branches.

Steps to Reproduce (git version 2.21.1)
1. Code in the pre-commit hook:
  echo "DEBUG 0='$0' 1='$1'"

2. run:
  git commit --amend

Current Result
  DEBUG 0='.git/hooks/pre-commit' 1=''

Expected Result
  DEBUG 0='.git/hooks/pre-commit' 1='--amend'

Please, let me know if you need other info.
I'm looking forward for a fix or workaround.

Thank you,
Andrea Wyss
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help