bugs/"error: invalid object", after add; cannot commit
git-annex
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/
git-annex
ikiwiki
2023-02-01T06:44:20Z
comment 1
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_1_2a64a2da445a64149da7335f35142a08/
zardoz
2016-03-12T16:58:09Z
2014-08-22T09:27:34Z
<p>git fsck only shows a few dangling blobs from a branch I did earlier and left behind, but otherwise reports no errors.</p>
<p>git annex fsck --fast ultimately fails with the original error message at some point:</p>
<div class="highlight-sh"><pre class="hl"><span class="hl slc"># If you can, paste a complete transcript of the problem occurring here.</span>
<span class="hl slc"># If the problem is with the git-annex assistant, paste in .git/annex/daemon.log</span>
<span class="hl slc"># nx fsck --fast|egrep -v 'ok$'</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">14</span><span class="hl opt">:</span><span class="hl num">43</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"ls-files"</span><span class="hl opt">,</span><span class="hl str">"--cached"</span><span class="hl opt">,</span><span class="hl str">"-z"</span><span class="hl opt">,</span><span class="hl str">"--"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">14</span><span class="hl opt">:</span><span class="hl num">43</span> CEST<span class="hl opt">]</span> chat<span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"check-attr"</span><span class="hl opt">,</span><span class="hl str">"-z"</span><span class="hl opt">,</span><span class="hl str">"--stdin"</span><span class="hl opt">,</span><span class="hl str">"annex.backend"</span><span class="hl opt">,</span><span class="hl str">"annex.numcopies"</span><span class="hl opt">,</span><span class="hl str">"--"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">14</span><span class="hl opt">:</span><span class="hl num">43</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"show-ref"</span><span class="hl opt">,</span><span class="hl str">"git-annex"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">14</span><span class="hl opt">:</span><span class="hl num">43</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"show-ref"</span><span class="hl opt">,</span><span class="hl str">"--hash"</span><span class="hl opt">,</span><span class="hl str">"refs/heads/git-annex"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">14</span><span class="hl opt">:</span><span class="hl num">43</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"log"</span><span class="hl opt">,</span><span class="hl str">"refs/heads/git-annex..dda9b068ac5c075e79ab63a531770ad772ae8491"</span><span class="hl opt">,</span><span class="hl str">"-n1"</span><span class="hl opt">,</span><span class="hl str">"--pretty=%H"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">14</span><span class="hl opt">:</span><span class="hl num">43</span> CEST<span class="hl opt">]</span> chat<span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"cat-file"</span><span class="hl opt">,</span><span class="hl str">"--batch"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">25</span><span class="hl opt">:</span><span class="hl num">24</span> CEST<span class="hl opt">]</span> chat<span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"hash-object"</span><span class="hl opt">,</span><span class="hl str">"-w"</span><span class="hl opt">,</span><span class="hl str">"--stdin-paths"</span><span class="hl opt">,</span><span class="hl str">"--no-filters"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">25</span><span class="hl opt">:</span><span class="hl num">24</span> CEST<span class="hl opt">]</span> feed<span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"update-index"</span><span class="hl opt">,</span><span class="hl str">"-z"</span><span class="hl opt">,</span><span class="hl str">"--index-info"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">25</span><span class="hl opt">:</span><span class="hl num">24</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"show-ref"</span><span class="hl opt">,</span><span class="hl str">"--hash"</span><span class="hl opt">,</span><span class="hl str">"refs/heads/git-annex"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">25</span><span class="hl opt">:</span><span class="hl num">24</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"write-tree"</span><span class="hl opt">]</span>
error<span class="hl opt">:</span> invalid object <span class="hl num">100644 5</span>d471129a031f0f493de3736eaea6f2f4056aeee <span class="hl kwa">for</span> <span class="hl str">'000/091/WORM-s1493-m1321288671--scrapbook%data%20111114173520%horiz-menu-tab-r_001.png.log'</span>
fatal<span class="hl opt">:</span> git-write-tree<span class="hl opt">:</span> error building trees
git-annex<span class="hl opt">:</span> failed to <span class="hl kwb">read</span> sha from git write-tree
<span class="hl opt">(</span>Recording state <span class="hl kwa">in</span> git...<span class="hl opt">)</span>
<span class="hl slc"># End of transcript or log.</span>
</pre></div>
comment 2
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_2_decb1689b8cc2541077e2d0ae273b5e7/
zardoz
2016-03-12T16:58:09Z
2014-08-22T09:38:03Z
<p>git commit with git-annex debug output enabled:</p>
<div class="highlight-sh"><pre class="hl"><span class="hl slc"># If you can, paste a complete transcript of the problem occurring here.</span>
<span class="hl slc"># If the problem is with the git-annex assistant, paste in .git/annex/daemon.log</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">36</span><span class="hl opt">:</span><span class="hl num">46</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"diff"</span><span class="hl opt">,</span><span class="hl str">"--cached"</span><span class="hl opt">,</span><span class="hl str">"--name-only"</span><span class="hl opt">,</span><span class="hl str">"-z"</span><span class="hl opt">,</span><span class="hl str">"--diff-filter=ACMRT"</span><span class="hl opt">,</span><span class="hl str">"--"</span><span class="hl opt">,</span><span class="hl str">"."</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">36</span><span class="hl opt">:</span><span class="hl num">46</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"diff"</span><span class="hl opt">,</span><span class="hl str">"--name-only"</span><span class="hl opt">,</span><span class="hl str">"--diff-filter=T"</span><span class="hl opt">,</span><span class="hl str">"-z"</span><span class="hl opt">,</span><span class="hl str">"--cached"</span><span class="hl opt">,</span><span class="hl str">"--"</span><span class="hl opt">,</span><span class="hl str">"."</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">36</span><span class="hl opt">:</span><span class="hl num">46</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"symbolic-ref"</span><span class="hl opt">,</span><span class="hl str">"HEAD"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">36</span><span class="hl opt">:</span><span class="hl num">46</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"show-ref"</span><span class="hl opt">,</span><span class="hl str">"refs/heads/master"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">36</span><span class="hl opt">:</span><span class="hl num">46</span> CEST<span class="hl opt">]</span> chat<span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"hash-object"</span><span class="hl opt">,</span><span class="hl str">"-w"</span><span class="hl opt">,</span><span class="hl str">"--stdin-paths"</span><span class="hl opt">,</span><span class="hl str">"--no-filters"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">36</span><span class="hl opt">:</span><span class="hl num">46</span> CEST<span class="hl opt">]</span> feed<span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"update-index"</span><span class="hl opt">,</span><span class="hl str">"-z"</span><span class="hl opt">,</span><span class="hl str">"--index-info"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">36</span><span class="hl opt">:</span><span class="hl num">46</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"show-ref"</span><span class="hl opt">,</span><span class="hl str">"--hash"</span><span class="hl opt">,</span><span class="hl str">"refs/heads/git-annex"</span><span class="hl opt">]</span>
<span class="hl opt">(</span>Recording state <span class="hl kwa">in</span> git...<span class="hl opt">)</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">36</span><span class="hl opt">:</span><span class="hl num">46</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"write-tree"</span><span class="hl opt">]</span>
error<span class="hl opt">:</span> invalid object <span class="hl num">100644 5</span>d471129a031f0f493de3736eaea6f2f4056aeee <span class="hl kwa">for</span> <span class="hl str">'000/091/WORM-s1493-m1321288671--scrapbook%data%20111114173520%horiz-menu-tab-r_001.png.log'</span>
fatal<span class="hl opt">:</span> git-write-tree<span class="hl opt">:</span> error building trees
git-annex<span class="hl opt">:</span> failed to <span class="hl kwb">read</span> sha from git write-tree
<span class="hl slc"># End of transcript or log.</span>
</pre></div>
comment 3
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_3_1f6443e495cc16a13e2e4175e73dc8f1/
zardoz
2016-03-12T16:58:09Z
2014-08-22T09:58:05Z
<p>Doing a git annex fsck on a new clone of the repository succeded; the problem must somehow with the .git/annex/index then, I presume?</p>
<p>I did a git reset to restore to the sane state state before adding, but the problem is that I cannot unannex the files I added. :(</p>
<div class="highlight-sh"><pre class="hl">nx unannex scrapbook<span class="hl opt">/</span>data<span class="hl opt">/</span><span class="hl num">20140822101558</span><span class="hl opt">/</span><span class="hl num">1</span>.jpg
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">56</span><span class="hl opt">:</span><span class="hl num">16</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"show-ref"</span><span class="hl opt">,</span><span class="hl str">"--head"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">56</span><span class="hl opt">:</span><span class="hl num">16</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"diff-index"</span><span class="hl opt">,</span><span class="hl str">"-z"</span><span class="hl opt">,</span><span class="hl str">"--raw"</span><span class="hl opt">,</span><span class="hl str">"--no-renames"</span><span class="hl opt">,</span><span class="hl str">"-l0"</span><span class="hl opt">,</span><span class="hl str">"--cached"</span><span class="hl opt">,</span><span class="hl str">"HEAD"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">56</span><span class="hl opt">:</span><span class="hl num">16</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"ls-files"</span><span class="hl opt">,</span><span class="hl str">"--cached"</span><span class="hl opt">,</span><span class="hl str">"-z"</span><span class="hl opt">,</span><span class="hl str">"--"</span><span class="hl opt">,</span><span class="hl str">"scrapbook/data/20140822101558/1.jpg"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">56</span><span class="hl opt">:</span><span class="hl num">16</span> CEST<span class="hl opt">]</span> call<span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"commit"</span><span class="hl opt">,</span><span class="hl str">"-q"</span><span class="hl opt">,</span><span class="hl str">"--allow-empty"</span><span class="hl opt">,</span><span class="hl str">"--no-verify"</span><span class="hl opt">,</span><span class="hl str">"-m"</span><span class="hl opt">,</span><span class="hl str">"content removed from git annex"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">56</span><span class="hl opt">:</span><span class="hl num">16</span> CEST<span class="hl opt">]</span> chat<span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"hash-object"</span><span class="hl opt">,</span><span class="hl str">"-w"</span><span class="hl opt">,</span><span class="hl str">"--stdin-paths"</span><span class="hl opt">,</span><span class="hl str">"--no-filters"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">56</span><span class="hl opt">:</span><span class="hl num">16</span> CEST<span class="hl opt">]</span> feed<span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"update-index"</span><span class="hl opt">,</span><span class="hl str">"-z"</span><span class="hl opt">,</span><span class="hl str">"--index-info"</span><span class="hl opt">]</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">56</span><span class="hl opt">:</span><span class="hl num">16</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"show-ref"</span><span class="hl opt">,</span><span class="hl str">"--hash"</span><span class="hl opt">,</span><span class="hl str">"refs/heads/git-annex"</span><span class="hl opt">]</span>
<span class="hl opt">(</span>Recording state <span class="hl kwa">in</span> git...<span class="hl opt">)</span>
<span class="hl opt">[</span><span class="hl num">2014</span><span class="hl kwb">-08-22</span> <span class="hl num">11</span><span class="hl opt">:</span><span class="hl num">56</span><span class="hl opt">:</span><span class="hl num">16</span> CEST<span class="hl opt">]</span> <span class="hl kwb">read</span><span class="hl opt">:</span> git <span class="hl opt">[</span><span class="hl str">"--git-dir=/home/seb/Webmirror/.git"</span><span class="hl opt">,</span><span class="hl str">"--work-tree=/home/seb/Webmirror"</span><span class="hl opt">,</span><span class="hl str">"write-tree"</span><span class="hl opt">]</span>
error<span class="hl opt">:</span> invalid object <span class="hl num">100644 5</span>d471129a031f0f493de3736eaea6f2f4056aeee <span class="hl kwa">for</span> <span class="hl str">'000/091/WORM-s1493-m1321288671--scrapbook%data%20111114173520%horiz-menu-tab-r_001.png.log'</span>
fatal<span class="hl opt">:</span> git-write-tree<span class="hl opt">:</span> error building trees
git-annex<span class="hl opt">:</span> failed to <span class="hl kwb">read</span> sha from git write-tree
</pre></div>
comment 4
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_4_522020e71393434834def6c80b82e39e/
zardoz
2016-03-12T16:58:09Z
2014-08-22T10:15:51Z
<p>The file referred to in the error message seems to be in good shape:</p>
<div class="highlight-sh"><pre class="hl">git <span class="hl kwb">--no-pager</span> show git-annex<span class="hl opt">:</span><span class="hl num">000</span><span class="hl opt">/</span><span class="hl num">091</span><span class="hl opt">/</span>WORM-s1493-m1321288671--scrapbook<span class="hl opt">%</span>data<span class="hl opt">%</span><span class="hl num">20111114173520</span><span class="hl opt">%</span>horiz-menu-tab-r_001.png.log
<span class="hl num">1408605730.57892</span>s <span class="hl num">0</span> b25f42de-f4be-4d31-84d1-ab0b71dfec01
<span class="hl num">1408562938.526946</span>s <span class="hl num">0</span> e148ea91-0eb6-4f47-86e9-db2136a15279
</pre></div>
<p>Strangely, the SHA1 of the blob is different from the one reported in the write-tree error.</p>
comment 5
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_5_cc4cba022869b32d298cdafed9545a34/
zardoz
2016-03-12T16:58:09Z
2014-08-22T13:07:34Z
I remembered I keep an hourly snapshot regimen and was able to get back the repository from before doing the «add» this morning. Both git fsck and git annex fsck return no errors, and yet, whenever anything is done to the git-annex branch (I tried add and forget), I get the above error.
comment 6
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_6_e71b251db2ff1f52a40fec40303cdefc/
zardoz
2016-03-12T16:58:09Z
2014-08-22T13:15:06Z
<p>I tried git annex repair on the repo (before doing any adds). It reports no fsck errors, but the repair then dies from a stack overflow.</p>
<div class="highlight-sh"><pre class="hl">Running git fsck ...
No problems found.
Stack space overflow<span class="hl opt">:</span> current size <span class="hl num">8388608</span> bytes.
Use <span class="hl str">`+RTS -Ksize -RTS' to increase it.</span>
</pre></div>
comment 7
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_7_0b6413f9ca403be3d83bb3306d1e7f8f/
zardoz
2016-03-12T16:58:09Z
2014-08-22T14:00:42Z
I experimented on my snapshot a bit and found out something odd: When I reset the git-annex branch from dda9b06 to git-annex~1 (4246f73) my local file additions succeed, even though git-annex will fast-forward the branch to dda9b06 again before adding (when merging from origin/git-annex). dda9b06 is a large commit in which I dropped many unused WORM keys from another remote.
comment 8
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_8_f951981f0bf8cbaecfc46e7b9c903d70/
zardoz
2016-03-12T16:58:09Z
2014-08-22T18:57:37Z
I just checked my other large git annex repo and noticed that here too I could no longer add files to the annex. The same observations as above apply. Here too on the tip of the git-anenx branch I had one huge commit in which I dropped the last of the unused WORM keys from another remote. Resetting the git-annex branch to git-annex~1 allowed me to make additions again, even though the reset tip was subsequently merged in again from the remote tracking branch.
comment 9
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_9_7c98c8b291fdf28a09ccb6c7e4001d5a/
zardoz
2016-03-12T16:58:09Z
2014-09-07T14:04:51Z
<p>Any ideas? I noticed one alternative way (cf. the reset workaround
above) to make «git annex add» work again is by deleting
.git/annex/index*. Is this safe?</p>
<p>In both repos, I had not even staged annex additions before the index
was corrupted; the corruption must somehow have been left-over from
earlier actions, altough all previous additions succeeded at the time,
before both repositories mysteriously stopped working (in the context
of backend-migration).</p>
<p>I still have the original snapshots around if you’d like to debug
this. As noted, «git fsck» succeeds, and all the block-level checksums
check out, so the problem can’t be on the block device or file-system
level.</p>
comment 10
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_10_8abfe7417167df54b686960319465a65/
CandyAngel
2016-03-12T16:58:09Z
2014-09-08T08:08:50Z
Removing .git/annex/index is safe, it is a step in getting git-annex to <a href="http://git-annex.branchable.com/forum/How_to_get_git-annex_to_forget_a_commit__63__">forget a commit entirely</a>.
comment 11
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_11_7776659e257a97c9a3855c8ad008207a/
joeyh.name
2016-03-12T16:58:09Z
2014-10-02T16:09:37Z
<p>It seems to me that the problem must be with .git/annex/index.</p>
<p>I would be interested in looking at this git repository, if there's a way to get a copy (no .git/annex/objects needed).</p>
ping?
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_12_e8bbfb4eb26dae31f90a5fa53b4dc948/
joey
2016-03-12T16:58:09Z
2015-02-10T17:37:06Z
<p>Do you still have this repository?</p>
<p>Marking this bug moreinfo.</p>
same problem
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_13_aee32c53d2198ba1e82acd0c617d517c/
zenture
2016-03-12T16:58:09Z
2015-05-29T08:30:42Z
<p>Hello, I've had the same problem, removing the index fixed the issue.</p>
<p>I have a backup of it, it's 88MB, how shall I share it with you, Joey?</p>
Same here
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_14_f41116524fb7b423ff03c9440b5f278b/
konubinix
2017-01-26T11:19:01Z
2017-01-26T11:19:01Z
Instead of index, I removed index.lck, it looks like it resolved the problem also.
Same here
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_15_0f61544accba5002edef2bcd4131e69f/
konubinix
2017-01-26T11:19:24Z
2017-01-26T11:19:24Z
Instead of index, I removed index.lck, it looks like it resolved the problem also.
Same here
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_16_9dc2f74dc69ccf867ac4e68cc502fda4/
konubinix
2017-01-26T11:19:50Z
2017-01-26T11:19:50Z
Instead of index, I removed index.lck, it looks like it resolved the problem also.
Same here
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_17_0525b887cd75c183a34de0f486ec022c/
konubinix
2017-01-26T11:20:12Z
2017-01-26T11:20:12Z
Instead of index, I removed index.lck, it looks like it resolved the problem also.
Same here
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_18_fd55979b686b5f83ba2b95300abd1852/
konubinix
2017-01-26T11:20:32Z
2017-01-26T11:20:32Z
Instead of index, I removed index.lck, it looks like it resolved the problem also.
bump
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_19_bdd9e29413f4407207efa01283ad68ad/
anarcat
2019-01-21T15:42:51Z
2019-01-05T23:06:05Z
<p>same here: scary error message, easy fix (<code>rm .git/annex/index.lck</code>):</p>
<pre><code>(recording state in git...)
error: invalid object 100644 81c85a0001f059e769034c34d4f739376ecd9429 for '000/53b/SHA256E-s1346--41101bacc557f53ceec3a7fd401a3f6a53c0dfe649ac7fe2812208e4d0384a13.RAF.xmp.log'
fatal: git-write-tree: error building trees
git-annex: failed to read sha from git write-tree
CallStack (from HasCallStack):
error, called at ./Git/Sha.hs:18:15 in main:Git.Sha
</code></pre>
<p>Unfortunately, this is a very large repo and I can't really reproduce now that I removed the lockfile. Do note there was an out of disk space condition earlier on that drive, but that was resolved before starting the git-annex operations. -- <a href="http://git-annex.branchable.com/users/anarcat/">anarcat</a></p>
comment 20
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_20_f12f7f14ef09fa765c78dbeef809da7d/
Atemu
2021-11-25T19:23:46Z
2021-11-25T19:23:46Z
<p>Also ran across this today. All I did was a simple copy of a few files to a remote using a filter. I can provide the index and lck files if needed.</p>
<pre><code>git-annex version: 8.20211011
</code></pre>
comment 21
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_21_3f2ce7b851392ad5285e95f3857d0959/
joey
2021-11-29T17:32:28Z
2021-11-29T17:09:33Z
<p>This seems to be a not entirely uncommon git failure.
<a href="https://www.google.com/search?client=firefox-b-1-d&q=git+error%3A+invalid+object+100644+">google search</a>
has tens of thousands of hits that look like this and do not involve
git-annex.</p>
<p>One commenter in <a href="https://stackoverflow.com/questions/14448326/git-commit-stopped-working-error-building-trees">https://stackoverflow.com/questions/14448326/git-commit-stopped-working-error-building-trees</a>
said it was a permissions problem.</p>
<p>Disconnecting a drive before all of git's changes have been written to it
seem like the other likely way.</p>
same error, same fix
http://git-annex.branchable.com/bugs/__34__error__58___invalid_object__34____44___after_add__59___cannot_commit/comment_22_94dc1d1485c3a380fe19dabe8f95aac2/
markus.l2ll
2023-02-01T06:44:20Z
2023-02-01T06:44:20Z
<p>Got the same error today, added some files (git annex add .) then tried to commit and got:</p>
<p>error: invalid object 100644 88e4306546e6d62a10fb79506d06bcf6492d3934 for '000/c75/SHA256E-s200678--f0fd2056044082bc8c0e03edb93fbcc745627b6e638c4e2f4263fbb0a1fa0cce.SDT.log'
fatal: git-write-tree: error building trees
.git-annex-wrapped: failed to read sha from git write-tree
CallStack (from HasCallStack):
error, called at ./Git/Sha.hs:23:15 in main:Git.Sha</p>
<p>Doing a <code>rm .git/annex/index.lck</code> fixed it.</p>