RESOLVED: Toe Collapse creates a 0 kb .toe file after pulling from a git repo

Hi all, I’m testing out the toecollapse and toeexpand tools and I’m encountering an issue where the Toe Collapse operation produces a 0kb toe file after pulling the .toc & .dir files from a git repo. When the expanded output is simply copied to another folder without git the operation works fine which is quite odd.

The steps to reproduce this issue are:

  1. expand your toe file
  2. push the .dir folder + .toc file to a repo
  3. pull into another instance of the repo within a different folder or computer
  4. collapse back into a toe file

The output should be a 0kb .toe file.

It looks like the number of files and size are identical between two instances so I’m not quite sure what’s wrong.

Has anyone encountered this? Is there a way to see toecollapse.exe logs?

First guess is that git is changing the newlines in the files. Depending on how your git is setup is may be switching the newlines when you commit. You want to ensure the newlines are preserved exactly for all git operations on these files.

Thanks Malcom, this worked for me. I took a look at the git output and, sure enough, it was changing the line endings on all those files.

For reference, I followed these steps to add the gitattributes file to the repo-

https://dev.to/deadlybyte/please-add-gitattributes-to-your-git-repository-1jld

Then marked all the files in the folder to binary, disabling eol formatting.

 .gitattributes

filename.toe.dir/* binary
*.toc binary