As per the document we can either use SCP or CURL to get the commit message but in TeamForge these are fixed. Need option to use either SCP or CURL to fetch commit message.

https://gerrit-review.googlesource.com/Documentation/cmd-hook-commit-msg.html

Reason, there are server with restricted SCP access and we prefer curl using ssh but there is no option to choose and we need to copy and edit separately.

existing:
git clone ssh://user@server:29418/public-reposync && cd "public-reposync" && git config user.name "User" && git config user.email "user@xyz.com" && scp -P 29418 user@tf-git-test01.devtools.intel.com:hooks/commit-msg .git/hooks/

option to choose like:

git clone ssh://user@server:29418/public-reposync && cd "public-reposync" && git config user.name "User" && git config user.email "user@xyz.com" && curl -o .git/hooks/commit-msg ssh://user@server:29418/gerrit/tools/hooks/commit-msg && chmod +x .git/hooks/commit-msg

Comments