git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Andrea Wyss <andrea.wyss@gmail.com>
To: git@vger.kernel.org
Subject: amend param not available to the pre-commit hook
Date: Sun, 2 Aug 2020 06:22:49 -0700	[thread overview]
Message-ID: <30DFCBF3-FEA8-4FF5-94ED-A81AB10B04A3@gmail.com> (raw)

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

             reply	other threads:[~2020-08-02 13:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-02 13:22 Andrea Wyss [this message]
2020-08-02 15:10 ` amend param not available to the pre-commit hook Phillip Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30DFCBF3-FEA8-4FF5-94ED-A81AB10B04A3@gmail.com \
    --to=andrea.wyss@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).