Recent comments posted to this site:

comment 17 360caa8972c2daa94044cc95188306e9
[[!comment Error: unsupported page format sh]]
Thu Mar 20 17:11:03 2025
comment 23 70dcb7e7ffdd14351adaf4c40ee7fdd0
[[!comment Error: unsupported page format hs]]
Thu Mar 20 17:11:03 2025
comment 3 e6ce9bb92c973350852c9498b7ffb50f
[[!comment Error: unsupported page format sh]]
Thu Mar 20 17:11:03 2025

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
Comment by joey Tue Mar 11 16:42:46 2025

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

Comment by yarikoptic Tue Mar 11 15:15:15 2025
Thank you for the clarification -- I have missed that there is an "entire" compute special remote interface. Cool!
Comment by yarikoptic Tue Mar 11 15:09:20 2025

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.

Comment by joey Mon Mar 10 20:42:26 2025
I don't see an option to specify which annexed files are input files, so annex could get them for comparing to happen to produce output file. That's what we do in datalad run, and it is very handy since allows to not worry about figuring out what to get first
Comment by yarikoptic Sat Mar 8 14:51:20 2025

Hello, I'm trying to use of Git-annex for some scientific applications, with a specific use case in mind:

  1. One large file is published on Zenodo.org, with a specific and permanent URL for each version (past & future).

  2. 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

  3. 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 !

Comment by jerome.charousset Thu Mar 6 17:02:22 2025

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 ```

Comment by czard Mon Mar 3 12:08:28 2025