{"thread":{"id":"53019","subject":"GIT bug: \"amend param is not available to pre-commit hook\"","startedAt":"2020-03-18T14:43:12Z","lastAt":"2020-03-18T14:43:12Z","messageCount":1,"participants":["Andrea Wyss"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"393397","messageId":"CAB8VZwTXVXHOf_WuU9goDaJRCdTnKeeQfL4hYn2PNQjhbYR9=Q@mail.gmail.com","threadId":"53019","inReplyTo":null,"subject":"GIT bug: \"amend param is not available to pre-commit hook\"","fromName":"Andrea Wyss","fromEmail":"awyss@lastline.com","sentAt":"2020-03-18T14:42:55Z","receivedAt":"2020-03-18T14:43:12Z","isPatch":false,"sender":{"key":"awyss@lastline.com","avatar":null},"body":"Issue\namend param is not available to pre-commit hook.\n\nProblem\nCannot write a pre-commit hook that stops amending a commit that is\npresent in other branches.\n\nSteps to Reproduce (git version 2.21.1 on macOS 10.15.3)\n1. In the pre-commit hook:\n   echo \"DEBUG 0='$0' 1='$1'\"\n\n2. run:\n   git commit --amend\n\nResult\n   DEBUG 0='.git/hooks/pre-commit' 1=''\n\nExpected Result\n   DEBUG 0='.git/hooks/pre-commit' 1='--amend'\n\nPlease, let me know if you need other information.\nI'm looking forward for a fix or workaround.\n\nThank you,\n\nAndrea Wyss\nSr Frontend Architect\nwww.lastline.com\n"}]}