What steps will reproduce the problem?

try to unlock a file in a git annex checkout

What is the expected output? What do you see instead?

% git annex unlock FILENAME
unlock FILENAME (copying...) cp: illegal option -- -
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
git-annex: copy failed!

(should unlock the file)

What version of git-annex are you using? On what operating system?

latest git annex osx build as of yesterday (12-11-03)

I've made the cp command be included in the OSX standalone build, so it will use the same one it's built with. So the next time we get an OSX build this will be fixed. done --Joey

Did you build this git-annex yourself? On the same machine?

What does it say if you add the --debug option?

Comment by http://joeyh.name/ Sun Nov 4 20:03:47 2012

Thanks for the quick response :) I think the problem is that the os x cp does not support ''--reflink" (and gnu long options). I guess I could install gnu coreutils through homebrew, though those will be prefixed with a g in the name. My OS version is 10.6.8 btw.

% git annex --debug unlock FILENAME
[2012-11-04 20:17:47 EST] read: git ["--git-dir=/PATH/.git","--work-tree=/PATH","ls-files","--cached","-z","--","FILENAME"]
unlock FILENAME (copying...) [2012-11-04 20:17:47 EST] call: cp ["--reflink=auto","-a","/PATH/.git/annex/objects/8P/Qp/SHA256-s7173120--33c3482bf70807bb5caede9859d10a73bda9279f08340556188c93dea7e5be05/SHA256-s7173120--33c3482bf70807bb5caede9859d10a73bda9279f08340556188c93dea7e5be05","/PATH/.git/annex/tmp/SHA256-s7173120--33c3482bf70807bb5caede9859d10a73bda9279f08340556188c93dea7e5be05"]
cp: illegal option -- -
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
git-annex: copy failed!
Ah, forgot to mention: I am running the latest build downloaded from the website (as mentioned above), so no, I did not build it myself.
% git annex version
git-annex version: 3.20121017
local repository version: 3
default repository version: 3
supported repository versions: 3
upgrade supported from repository versions: 0 1 2

Also, while browsing the archive for another problem (can not add files because shasum256 is missing and I get a "dyld: Library not loaded: /opt/local/lib/libintl.8.dylib" for it's execution when I add the path for /Applications/git-annex.app/Contents/MacOS/bin/sha256sum) I saw that it should fall back on haskell code - which it doesn't, so maybe its an old version?

Comments on this page are closed.