Date: Mon, 5 Jul 2021 09:41:55 -0600 From: Warner Losh <imp@bsdimp.com> To: Mathieu Arnold <mat@freebsd.org> Cc: Nuno Teixeira <eduardo@freebsd.org>, freebsd-git <freebsd-git@freebsd.org> Subject: Re: git command to run .hooks/prepare-commit-msg Message-ID: <CANCZdfoBBL2nbW3iBgo9mpqrkxmw9-76NUpZai_V6uUHSBUqZQ@mail.gmail.com> In-Reply-To: <20210705145219.xouxdlzlwvoijbo5@aching.in.mat.cc> References: <CAFDf7UL%2BOP4Se4UwMGdQFSVtKSx%2B6QSCHUezKMVpZucVd7Gwdw@mail.gmail.com> <CAFDf7UKBCX24gioLxF=Xt3wROVo8Cqzf=MieQ%2B=YcWuiX_JEOA@mail.gmail.com> <CANCZdfr9RDOA5RXFkws%2BXmFyy5kvpN11uTwrwRjm66UDAmp_Fw@mail.gmail.com> <20210705145219.xouxdlzlwvoijbo5@aching.in.mat.cc>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000c948b605c66225ef Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jul 5, 2021 at 8:52 AM Mathieu Arnold <mat@freebsd.org> wrote: > On Sat, Jul 03, 2021 at 11:07:59AM -0600, Warner Losh wrote: > > On Sat, Jul 3, 2021 at 11:00 AM Nuno Teixeira <eduardo@freebsd.org> > wrote: > > > > > ---------- Forwarded message --------- > > > De: Nuno Teixeira <eduardo@freebsd.org> > > > Date: s=C3=A1bado, 3/07/2021 =C3=A0(s) 17:57 > > > Subject: git command to run .hooks/prepare-commit-msg > > > To: FreeBSD Mailing List <freebsd-ports@freebsd.org> > > > > > > > > > Hello, > > > > > > I can't find git command so I can run .hooks/prepare-commit-msg when = I > > > commit. > > > > > > > Please see > > > https://docs.freebsd.org/en/articles/committers-guide/#git-mini-primer-ge= tting-started > > at the end of the 'Dialy Use' section for the details. It would seem yo= u > > have the path > > a bit confused. It's not .hooks, but rather .git/hooks. > > It is .hooks. > The default for git is .git/hooks. However, we recommend in the instructions for the ports tree to set it with `git config --add core.hooksPath .hooks` and have the ports hooks there. We don't do that for the src tree. In the src tree we have a lot of files in .git/hooks that are samples. Also, that command is just for the current tree, so it needs to be repeated for new trees you checkout. Warner --000000000000c948b605c66225ef--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoBBL2nbW3iBgo9mpqrkxmw9-76NUpZai_V6uUHSBUqZQ>