I'd like to send a system command to obtain the commit of a git tag, I'm trying to do this using the git rev-parse functionality:
cmd = 'git rev-parse v1.3^{}'[resp,cmdOut] = system(cmd)
Gives me the response:
resp = 128cmdOut = 'v1.3{} fatal: ambiguous argument 'v1.3{}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' '
The ^ character does not arrive in the shell. I tested this by:
cmd = 'echo git rev-parse v1.3^{}'[resp,cmdOut] = system(cmd)
which gives me
resp = 0cmdOut = 'git rev-parse v1.3{} '
I'm on a windows computer. I tried the same yesterday in octave online (https://octave-online.net/) which does give me the expected respone. I do think that octave online runs linux though.
Best Answer