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