datalad
datalad copied to clipboard
cmdline adhoc config not picked up
URL remapping is needed to make special remote work. And works with git-annex
git -c 'url.ria+file:///p/largedata/bigbrains/data.insteadof=ria+ssh://judac:/p/largedata/bigbrains/data' annex get datum
get datum (from judac-ria...)
(checksum...) ok
(recording state in git...)
Same thing with datalad, not workyworky
$ datalad -c 'url.ria+file:///p/largedata/bigbrains/data.insteadof=ria+ssh://judac:/p/largedata/bigbrains/data' get datum
[WARNING] Running get resulted in stderr output: git-annex: get: 1 failed
[ERROR ] from judac-ria...; Unable to access these remotes: judac-ria; Try making some of these repositories available:; 5db17397-9f45-4465-a236-1364f498f0f8 -- [judac-ria]; f8857ff1-3de6-403e-8217-070db47f5a91 -- scan3d@ime262:/Areca01/human; ; (Note that these git remotes have annex-ignore set: origin) [get(/p/fastdata/bigbrains/human/datum)]
get(error): datum (file) [from judac-ria...; Unable to access these remotes: judac-ria; Try making some of these repositories available:; 5db17397-9f45-4465-a236-1364f498f0f8 -- [judac-ria]; f8857ff1-3de6-403e-8217-070db47f5a91 -- scan3d@ime262:/Areca01/human; ; (Note that these git remotes have annex-ignore set: origin)]
Confirmed the issue goes away when the config is put into a file.
Thanks for report.
This looks like it boils down to expecting the -c values to be propagated to the underlying git(-annex) calls. While datalad internally uses -c in some of its calls to git, it doesn't pass on the overrides specified via datalad -c.
cd "$(mktemp -d --tmpdir dl-XXXXXXX)"
datalad create a
: >a/f
datalad -C a save
datalad clone a b
datalad -C b --log-level=9 -c foo.bar=baz get f 2>&1 | grep "Running"
[...]
[Level 9] Running: ['git', 'config', '-z', '-l', '--show-origin']
[Level 9] Running: ['git', 'annex', 'version', '--raw']
[Level 9] Running: ['git', '-c', 'annex.merge-annex-branches=false', 'annex', 'find', '--json', '--json-error-messages', '--not', '--in', '.', '--', 'f']
[Level 9] Running: ['git-annex', 'get', '--json', '--json-error-messages', '--json-progress', '-J4', '--', 'f']
I haven't thought about it too deeply, but passing along the values wholesale and un-inspected would be problematic because they might conflict with the values that we pass for -c. Pulling out particular overrides of interest seems worth considering, though that sounds like a bottomless pit.
Thanks for the analysis!
FTR: #3456 is concerned with a related topic.
This issue is fixed when installing datalad-next 1.0.0b3 and enabling its datalad-runtime-patching via git config --global --add datalad.extensions.load next.