# GIT bug: "amend param is not available to pre-commit hook"

1 messages from 2020-03-18 to 2020-03-18. Participants: Andrea Wyss.
Thread: https://gitlist.dev/t/53019

## Andrea Wyss, 2020-03-18 14:42

Subject: GIT bug: "amend param is not available to pre-commit hook"
Message-ID: <CAB8VZwTXVXHOf_WuU9goDaJRCdTnKeeQfL4hYn2PNQjhbYR9=Q@mail.gmail.com>
URL: https://gitlist.dev/e/CAB8VZwTXVXHOf_WuU9goDaJRCdTnKeeQfL4hYn2PNQjhbYR9%3DQ%40mail.gmail.com

```
Issue
amend param is not available to 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 on macOS 10.15.3)
1. In the pre-commit hook:
   echo "DEBUG 0='$0' 1='$1'"

2. run:
   git commit --amend

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 information.
I'm looking forward for a fix or workaround.

Thank you,

Andrea Wyss
Sr Frontend Architect
www.lastline.com

```
