On 28 Nov 2018, at 07:39, Paul Tung <baiba...@gmail.com> wrote:Hi there,After update my Gerrit from 2.15 -> 2.16, I found the "commit-msg" has been changed and not compatible to git 1.8.3.1 anymore.Seems it has updated in 2.16:Now I copy the old version to colleagues who new clone the repo and replace downloaded from Gerrit server.I knew a way is to upgrade git 2.x, but it is too hard to approach in my company.
Is there any other elegant way to solve it?Thanks!Paul
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 28 Nov 2018, at 08:17, Luca Milanesio <luca.mi...@gmail.com> wrote:On 28 Nov 2018, at 07:39, Paul Tung <baiba...@gmail.com> wrote:Hi there,After update my Gerrit from 2.15 -> 2.16, I found the "commit-msg" has been changed and not compatible to git 1.8.3.1 anymore.Seems it has updated in 2.16:Now I copy the old version to colleagues who new clone the repo and replace downloaded from Gerrit server.I knew a way is to upgrade git 2.x, but it is too hard to approach in my company.Git 1.8.x has been released 6 years ago, 2.x released 4 years ago: too hard?
On 28 Nov 2018, at 08:17, Luca Milanesio <luca.mi...@gmail.com> wrote:
On 28 Nov 2018, at 07:39, Paul Tung <baiba...@gmail.com> wrote:Hi there,After update my Gerrit from 2.15 -> 2.16, I found the "commit-msg" has been changed and not compatible to git 1.8.3.1 anymore.Seems it has updated in 2.16:Now I copy the old version to colleagues who new clone the repo and replace downloaded from Gerrit server.I knew a way is to upgrade git 2.x, but it is too hard to approach in my company.Git 1.8.x has been released 6 years ago, 2.x released 4 years ago: too hard?
On 28 Nov 2018, at 08:44, GMail_BaiBai.Tung <baiba...@gmail.com> wrote:Great thanks for your quick response, no need to apologies. :)I know it sounds no sense, but ... uh ... can't say.I am looking forward to your "pain workaround" and maybe an excuse to push to update 2.x. :P
Luca.
To unsubscribe, email repo-disc...@googlegroups.com
Hi,I have the same problem with my company. They are stuck with using CentOS with the official repositories and there is no way to get a git 2.x (unless we get the rpm from somewhere else... but that would upset our IT).
And this is just because CentOS is suggested for enterprise environment (not sure where this comes from, bs to me... personally I would stick with Debian all my life)Sorry, just saying.
To unsubscribe, email repo-discuss...@googlegroups.com
I have the same problem with my company. They are stuck with using CentOS with the official repositories and there is no way to get a git 2.x (unless we get the rpm from somewhere else... but that would upset our IT)
$ git --version
git version 2.16.4
curl https://gerrit.googlesource.com/gerrit/+archive/stable-2.15/gerrit-server/src/main/resources/com/google/gerrit/server/tools/root/hooks.tar.gz -o /tmp/hook.tar.gz && tar -jxvf /tmp/hook.tar.gz -C $GERRIT_SITE/static/ && rm -f /tmp/hook.tar.gz git config -f $GERRIT_SITE/etc/gerrit.config gerrit.installCommitMsgHookCommand 'gitdir=$(git rev-parse --git-dir); curl -o ${gitdir}/hooks/commit-msg https://gerrit.mycompany.com/static/commit-msg ; chmod +x ${gitdir}/hooks/commit-msgOn 29 Nov 2018, at 07:22, Paul Tung <baiba...@gmail.com> wrote:Hi Luca.,I adopted the workaround and found a little problems, here is the detail for your reference:[part I]1. It should be add "/" in the end of "static" => .... > $GERRIT_SITE/static/2. Even so, the downloaded file is garbled.=> I change to download and un-tar the file withcurl https://gerrit.googlesource.com/gerrit/+archive/stable-2.15/gerrit-server/src/main/resources/com/google/gerrit/server/tools/root/hooks.tar.gz -o /tmp/hook.tar.gz && tar -jxvf /tmp/hook.tar.gz -C $GERRIT_SITE/static/ && rm -f /tmp/hook.tar.gz
[part II]It just leak a single quotation in the end of command => ... chmod +x ${gitdir}/hooks/commit-msg'git config -f $GERRIT_SITE/etc/gerrit.config gerrit.installCommitMsgHookCommand 'gitdir=$(git rev-parse --git-dir); curl -o ${gitdir}/hooks/commit-msg https://gerrit.mycompany.com/static/commit-msg ; chmod +x ${gitdir}/hooks/commit-msg
Then the workaround is working perfectly!
Thanks for your wonderful help!
Best regards,Paul
lucamilanesio於 2018年11月28日星期三 UTC+8下午4時48分52秒寫道:There you go:Once reviewed, is going to be incorporated in the official release notes.Luca.