Community
Participate
Working Groups
The pre-psuh hook STDIN <remote SHA-1> argument is always NULL_COMMIT even if the foreign ref exist. From Git documentation: ----------------------------- Information about what is to be pushed is provided on the hook’s standard input with lines of the form: <local ref> SP <local sha1> SP <remote ref> SP <remote sha1> LF although the full, 40-character SHA-1s would be supplied. If the foreign ref does not yet exist the <remote SHA-1> will be 40 0. If a ref is to be deleted, the <local ref> will be supplied as (delete) and the <local SHA-1> will be 40 0. If the local commit was specified by something other than a name which could be expanded (such as HEAD~, or a SHA-1) it will be supplied as it was originally given. In JGIT ----------- I always get 40 0 for the <remote SHA-1> argument even when the foreign remote exists