Hello everyone,
I have some PDF documents in a git annex repository. I appended a page to (several) of these PDF documents the following way:
git annex edit file.pdf
- Append page to file.pdf
git annex add file.pdf
git commit
If I now look at file.pdf it will not have the appended page. But if do git annex edit file.pdf
again I will get the version with the appended page. git annex add file.pdf
and the page "disappears" again. Anyone got any tips on how to solve this "mystery"?
All the best, Per
The symlink should point to the new version, unless git-annex is catastropically broken, and this can be easily demonstrated that git-annex is not catastropically broken:
So, what's really going on for you to see what you see when you look at the pdf? My guess is that your pdf editor/viewer is doing something bad/smart when it encounters the symlink. Perhaps it's loading an old cached version of the pdf rather than following the symlink or something.
When you use
git annex edit
, the file stops being a symlink, and so whatever smart/bad behavior is causing the problem is avoided.If this is the case, switching to direct mode would avoid the problem. (
git annex direct
)If I were using a program and verfied that it has such bad/smart behavior on symlinks, I'd complain vigorously to its creators; it should't matter if a program is asked to open a symlink or not, it should behave the same either way. Unfortunately, it seems that some programs go out of their way to get this wrong and all we can do about it is filed bugs and/or use direct mode.
Thank you for the response. Sorry I didn't think of the possibility that the PDF reader could be the problem. I have done the same operation many times and never encountered this problem before though. The culprit is Apple's Preview.app. It now shows the new version and to my knowledge I haven't done anything in the meantime. Guess it is just time passed that has fixed "the problem".
Thank you!