What steps will reproduce the problem? I don't know exactly when it started
What is the expected output? What do you see instead? When I run git annex unused I get
unused . (checking for unused data...) (checking master...) git-annex: Cannot decode byte '\xb4': Data.Text.Encoding.decodeUtf8: Invalid UTF-8 stream
Most likely I have added some file with a strange encoding that git-annex can't decode. The problem is that the unused process aborts because of this.
What version of git-annex are you using? On what operating system? 3.20120522, Debian testing
I've just fixed this bug in git, will be in the next release. --Joey done
git annex unused --debug
; this will tell us the git command that's outputing the data it cannot process. Then you can try running that git command and see what the problem filename is.locale
setting may also be relevant. FWIW, I've tried to create a file with\xb4
in its name and have not gotten git-annex unused to crash on it.This is what happens when I add the debug parameter
git annex unused --debug
unused . (checking for unused data...) git ["--git-dir=/home/kristian/AnnexMedia/.git","--work-tree=/home/kristian/AnnexMedia","ls-files","--cached","-z","--","/home/kristian/AnnexMedia"] git ["--git-dir=/home/kristian/AnnexMedia/.git","--work-tree=/home/kristian/AnnexMedia","show-ref"] (checking master...) git ["--git-dir=/home/kristian/AnnexMedia/.git","--work-tree=/home/kristian/AnnexMedia","ls-tree","--full-tree","-z","-r","--","refs/heads/master"] git ["--git-dir=/home/kristian/AnnexMedia/.git","--work-tree=/home/kristian/AnnexMedia","cat-file","--batch"] git-annex: Cannot decode byte '\xb4': Data.Text.Encoding.decodeUtf8: Invalid UTF-8 stream
I checkout out the git annex branch and using
I found a file
The corresponding file also existed in the master branch (as a link).
I moved both these files to a folder outside my repository and synched my git-annex branch with by master server. I still get the same error. Is there any other place where information about this file is stored?
git-annex was not crashing due to content in the git-annex branch, but due to a symlink in one of your regular git branches, probably master and origin/master.
This bug is fixed in git master, if you need the fix before the next release.