Recent comments posted to this site:
And there could be some generic "helper" (or a number of them) which would then provide desired CLI interfacing over arbitrary command
Absolutely!
You do need to use "--" before your own custom dashed options.
And bear in mind that "field=value" parameters passed to initremote will be passed on to the program. So you can have a generic helper that is instantiated with a parameter like --command=, which then gets used automatically when running addcompute:
git-annex initremote foo type=compute program=git-annex-compute-generic-helper -- --command='convert {inputs} {outputs}'
git-annex addcomputed --to=foo -- -i foo.jpeg -o foo.gif
it was more flexible to have a more freeform command line, which the compute program parses
agree. And there could be some generic "helper" (or a number of them) which would then provide desired CLI interfacing over arbitrary command, smth like (mimicing datalad-run interface here):
git-annex addcomputed --to=runcmd -i foo.jpeg -o foo.gif
as long as we can pass options like that or after --
, e.g.
git-annex addcomputed --to=runcmd -- -i foo.jpeg -o foo.gif -- convert {inputs} {outputs}`
which would then
- ensure no stdout from convert
- follow the compute special remote interface to let git-annex know what inputs/outputs were
git-annex does know what both the input and the output files are. It learns this by running the compute program and seeing what INPUT and OUTPUT lines it emits.
I considered having some --input=
option, but decided that it was more
flexible to have a more freeform command line, which the compute program
parses.
Hello, I'm trying to use of Git-annex for some scientific applications, with a specific use case in mind:
One large file is published on Zenodo.org, with a specific and permanent URL for each version (past & future).
I annexed the current version with something like :
git annex addurl --file=my-input-file <the-url-of-the-current-version-on-zenodo> ; git commit ... ; git annex sync
When a newer version is published on Zenodo, I would like to "upgrade" the annexed file to the newer version. I did some experiment and it seems to work by doing this :
git rm my-input-file ; git annex addurl --file=my-input-file <the-url-of-the-newer-version-on-zenodo> ; git commit ... ; git annex sync
Does that make sense ? is there any risk ? is there a easier/more direct way to achieve what I want ?
Thanks in advance for your support !
Hi,
Lots of gratitude for your work on git annex.
I have an annex repo with a default setting to unlock files. When I run git annex add myfile
, I notice a change related to permission is added to my file in the working tree, which I need to further git add
in order to get to a clean state. See below.
Is that expected? I'm wondering if it wouldn't make more sense / be a better experience if git annex add myfile
would seamlessly handle that permission change and add it to git for unlocked files, so I don't have to run both git annex add
and git add
to get to a clean state?
Thanks.
``` $ git status On branch main Untracked files: (use "git add ..." to include in what will be committed) 05 Tapestry.mp3
nothing added to commit but untracked files present (use "git add" to track)
$ git annex add . add 05 Tapestry.mp3 ok (recording state in git...)
$ git status On branch main Changes to be committed: (use "git restore --staged ..." to unstage) new file: 05 Tapestry.mp3
Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: 05 Tapestry.mp3
$ git diff 05 Tapestry.mp3 changed file mode from 100644 to 100755 ```