<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div><br></div><div>My SimpleITK git repo, is a little messed up. When I first noticed I made a new backup. </div><div><br></div><div>I began getting the following error when building SimpleITK:</div><div><br></div><div><div>$ cmake .</div><div>CMake Error: File /nfs/Users/blowekamp/src/SimpleITK/.git/refs/heads/next does not exist.</div><div>CMake Error at /scratch/blowekamp/build/SimpleITK/SimpleITK-build/CMakeFiles/git-data/grabRef.cmake:23 (configure_file):</div><div> configure_file Problem configuring file</div><div>Call Stack (most recent call first):</div><div> CMake/GetGitRevisionDescription.cmake:58 (include)</div><div> Version.cmake:7 (get_git_head_revision)</div><div> CMakeLists.txt:129 (include)</div></div><div><br></div><div><br></div><div>Looking at that directory I don't see much ( my other repos have all the local branches there ):</div><div><br></div><div><div>$ ls -l .git/refs/heads/</div><div>total 16</div><div>drwxr-xr-x 2 blowekamp users 2048 Aug 31 2011 stage</div></div><div><br></div><div>When I do a git branch, I see all my branches. </div><div><br></div><div>the head under log appears like what I would expect.</div><div><br></div><div><div>$ ls -l .git/logs/refs/heads/</div><div>total 400</div><div>-rw-r--r-- 1 blowekamp users 0 Jun 14 08:30 AddImageConstructorForVector</div><div>-rw-r--r-- 1 blowekamp users 183 Jun 14 08:30 AddSomeFilters</div><div>-rw-r--r-- 1 blowekamp users 367 Jun 14 08:30 AddVirtualDestructorToFilterExecuteBase</div><div>-rw-r--r-- 1 blowekamp users 591 Jun 14 08:30 AddingGradientFilters</div><div>-rw-r--r-- 1 blowekamp users 0 Jun 14 08:30 Enable64BitIntegers</div><div>-rw-r--r-- 1 blowekamp users 173 Jun 14 08:30 MergeREnhancements</div><div>-rw-r--r-- 1 blowekamp users 173 Jun 14 08:30 SIMPLEITK-103_RemoveMacroToken</div><div>-rw-r--r-- 1 blowekamp users 146 Jun 14 08:30 SIMPLEITK-122_AddImageSeriesWriter</div><div>-rw-r--r-- 1 blowekamp users 1501 Jun 14 08:30 SIMPLEITK-167-CompareITKandSITKfilters</div><div>-rw-r--r-- 1 blowekamp users 0 Jun 14 08:30 SIMPLEITK-182_FixFFTConvolutionExample</div><div>-rw-r--r-- 1 blowekamp users 0 Jun 14 08:30 SIMPLEITK-1_AddImageRegistration</div><div>-rw-r--r-- 1 blowekamp users 0 Jun 14 08:30 SIMPLEITK-1_registration</div><div>-rw-r--r-- 1 blowekamp users 0 Jun 14 08:30 SIMPLEITK-205_AddingCorrelationFilters</div><div>-rw-r--r-- 1 blowekamp users 167 Jun 14 08:30 SIMPLEITK-224_AddVectorSupportGetBuffer_bak</div><div>-rw-r--r-- 1 blowekamp users 1239 Jun 14 08:30 SIMPLEITK-246_NativeSugarForR</div><div>-rw-r--r-- 1 blowekamp users 189 Jun 14 08:30 SIMPLEITK-264_AddTransformations</div><div>-rw-r--r-- 1 blowekamp users 2090 Jun 14 08:30 SIMPLEITK-279_AddComposeImageFilter</div><div>-rw-r--r-- 1 blowekamp users 0 Jun 14 08:30 SIMPLEITK-286_AddNumpySupportForVectorImages</div><div>-rw-r--r-- 1 blowekamp users 968 Jun 14 08:30 SIMPLEITK-292_AddImageSources</div><div>-rw-r--r-- 1 blowekamp users 360 Jun 14 08:30 SIMPLEITK-295_AddGradientFilter</div><div>-rw-r--r-- 1 blowekamp users 167 Jun 14 08:30 SIMPLEITK-296_Clang-requires-explicit-Disambiguation</div><div>-rw-r--r-- 1 blowekamp users 400 Jun 14 08:30 SIMPLEITK-297_UpdateITKTowardsITK4.2</div><div>-rw-r--r-- 1 blowekamp users 1428 Jun 14 08:30 SIMPLEITK-74_AutomaticallyComputeTimeStep</div><div>-rw-r--r-- 1 blowekamp users 784 Jun 14 08:30 SIMPLEITK-AddNumpySupportForVectorImages</div><div>-rw-r--r-- 1 blowekamp users 0 Jun 14 08:30 SugarForR</div><div>-rw-r--r-- 1 blowekamp users 372 Jun 14 08:30 UpdateDataSubmodule</div><div>-rw-r--r-- 1 blowekamp users 1111 Jun 14 08:30 VectorConfidenceConnected</div><div>-rw-r--r-- 1 blowekamp users 2654 Jun 14 08:30 master</div><div>-rw-r--r-- 1 blowekamp users 8619 Jun 14 08:30 next</div><div>-rw-r--r-- 1 blowekamp users 401 Jun 14 08:30 release</div><div>drwxr-xr-x 2 blowekamp users 2048 Aug 31 2011 stage</div><div>-rw-r--r-- 1 blowekamp users 373 Jun 14 08:30 temp</div></div><div><br></div><div><div>$ git fsck --full </div><div>dangling commit 976620baf25b05208035785ebbf0195dffcbcc56</div><div>dangling commit 4197609c3895b2769b2e0f14e66583b543047efe</div><div>dangling commit 0a9b502b2953eb12310488e8fae47315867775c8</div><div>dangling commit 93bfe0cc0767af6bf66fbe1ef6ed28a0d698de67</div><div>dangling commit 5ceb60e695a9a0405bfe2f88e4bea6c0c347ec44</div><div>dangling commit ce0051a19798db5071f30ca45a56beedec57a8d1</div><div>dangling commit 1f9f312bcc118de87da51ed41b3c1233f7e8f22a</div><div>dangling commit a9d8414edde4e72a994aa27dc97bfed59fd5b4a8</div><div>dangling commit 19dc61bba4ceb86f5a6faabab6f60ac134f73b92</div><div>dangling commit b8ed719fceb2d9a1c1f3a2b259471d6fb2fb5063</div><div>dangling commit ba5bc2d40c5329a1030c5df332ebee88f3e1e2ea</div><div>dangling blob.. ( a couple more )</div><div>dangling commit... ( couple dozen more )</div></div><div><br></div><div>I am looking for suggestions are recovery options. </div><div><br></div><div>Is there a way to rebuild .git/refs/head?</div><div><br></div><div>Or ways to check if the damage is further than what I think now.</div><div><br></div><div>Thanks,</div><div>Brad</div><div><br><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">========================================================</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Bradley Lowekamp<span class="Apple-converted-space"> </span><span class="Apple-converted-space"> </span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Medical Science and Computing for</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Office of High Performance Computing and Communications</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">National Library of Medicine<span class="Apple-converted-space"> </span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; "><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a></font></p><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline">
</div>
<br></div></body></html>