git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* amend param not available to the pre-commit hook
@ 2020-08-02 13:22 Andrea Wyss
  2020-08-02 15:10 ` Phillip Wood
  0 siblings, 1 reply; 2+ messages in thread
From: Andrea Wyss @ 2020-08-02 13:22 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-02 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-02 13:22 amend param not available to the pre-commit hook Andrea Wyss
2020-08-02 15:10 ` Phillip Wood

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).