From: mih Date: Thu, 25 Apr 2024 15:15:24 +0000 (+0000) Subject: Q on the cheapest test for an initialized annex X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~25^2~8^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9c78ab198ebbaaff535a4dce44f258c2a06121a2;p=git-annex.git Q on the cheapest test for an initialized annex --- diff --git a/doc/forum/Cheapest_test_for_an_initialized_annex__63__.mdwn b/doc/forum/Cheapest_test_for_an_initialized_annex__63__.mdwn new file mode 100644 index 0000000000..86cfef9200 --- /dev/null +++ b/doc/forum/Cheapest_test_for_an_initialized_annex__63__.mdwn @@ -0,0 +1,11 @@ +I need to implement some functionality that should work in similar ways when faced with a plain Git vs a git-annex repo. In this context I am looking for the cheapest of the appropriate tests for an initialized annex? + +I have looked at + +- `git config annex.uuid` (~3ms) +- `git rev-parse git-annex` (~3ms) +- `git annex info --fast -q` (~50ms) + +Are the fast ones sufficient to guarantee that no subsequent call to a git-annex command would yield `git-annex: First run: git-annex init`? + +Thanks!