[vtk-developers] VTK review - gerrit hooks (was Re: Auto install git hooks)
Nicole Aucoin
nicole at bwh.harvard.edu
Tue Aug 2 11:27:47 EDT 2011
Thanks, Bill, that got me set up to do an amended commit to gerrit.
Nicole
On 07/28/2011 07:36 AM, Bill Lorensen wrote:
> Nicole,
> I assume after cloining VTK you did this:
>
> ./Utilities/SetupForDevelopment.sh
>
> Bill
>
> On Wed, Jul 27, 2011 at 6:33 PM, Nicole Aucoin <nicole at bwh.harvard.edu
> <mailto:nicole at bwh.harvard.edu>> wrote:
>
> Hello,
>
> I'm doing my first amended review for a VTK gerrit topic,
> following these instructions:
> http://www.vtk.org/Wiki/VTK/Git#Gerrit
> Under Revise a Gerrit topic, I'm at the point where I'm running
> git commit --amend
> but it's failing with:
>
> Please initialize your local Git hooks.
> Paste the following commands into a shell:
>
> cd "/projects/birn/nicole/VTK/VTKgerrit/.git/hooks"
> git init
> git pull .. remotes/origin/hooks
> cd ../..
>
> When I tried to do the git pull, it returns an error:
> fatal: Couldn't find remote ref remotes/origin/hooks
> fatal: The remote end hung up unexpectedly
>
> When I look at the .git/hooks directory, there are files there:
> > ls
> total 88
> 8 applypatch-msg.sample* 8 post-receive.sample* 8 pre-commit*
> 8 pre-rebase.sample*
> 8 commit-msg.sample* 8 post-update.sample* 8
> pre-commit.sample* 8 update.sample*
> 8 post-commit.sample* 8 pre-applypatch.sample* 8
> prepare-commit-msg.sample*
>
> but the commit still fails with the first error message asking me
> to initialize the local Git hooks. git remote returns:
> gerrit
>
> Any ideas what's going wrong? My initial workflow was to look at
> the code review and run the git fetch command:
> git fetch http://review.source.kitware.com/p/VTK
> refs/changes/47/2147/1 && git checkout FETCH_HEAD -b ruler-tweaks
> Is there a different workflow I should follow if I'm just revising
> a topic rather than starting from making a new topic myself?
>
> Nicole
>
>
> On 07/16/2010 01:02 PM, Brad King wrote:
>
> On 07/16/2010 12:51 PM, Moreland, Kenneth wrote:
>
> Maybe I’m being stupid, but if you are installing a
> pre-commit hook to
> check the hooks, why not just install the hooks you really
> want in the
> first place?
>
> I considered that, but:
>
> - We want to share the hooks across many projects. It is
> much easier
> to have a single "hooks" branch history that we push to all
> of them
> than to merge changes into every project tree.
>
> - We want to use the most recent hooks the user has installed no
> matter what version of the project is configured.
>
> - I do not want to create logic in every project to decide
> when to
> overwrite the hook with an updated one.
>
> The current approach puts in a tiny script with logic that
> does not
> change when we want new hooks.
>
> -Brad
> _______________________________________________
> Powered by www.kitware.com <http://www.kitware.com>
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
> _______________________________________________
> Powered by www.kitware.com <http://www.kitware.com>
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
More information about the vtk-developers
mailing list