git-annex/CmdLine
Joey Hess 59fc2005ec
git clone support for git-remote-annex
Also support using annex:: urls that specify the whole special remote
config.

Both of these cases need a special remote to be initialized enough to
use it, which means writing to .git/config but not to the git-annex
branch. When cloning, the remote is left set up in .git/config,
so further use of it, by git-annex or git-remote-annex will work. When
using git with an annex:: url, a temporary remote is written to
.git/config, but then removed at the end.

While that's a little bit ugly, the fact is that the Remote interface
expects that it's ok to set git configs of the remote that is being
initialized. And it's nowhere near as ugly as the alternative of making
a temporary git repository and initializing the special remote in there.

Cloning from a repository that does not contain a git-annex branch and
then later running git-annex init is currently broken, although I've
gotten most of the way there to supporting it.
See cleanupInitialization FIXME.

Special shout out to git clone for running gitremote-helpers with
GIT_DIR set, but not in the git repository and with GIT_WORK_TREE not
set. Resulting in needing the fixupRepo hack.

Sponsored-by: unqueued on Patreon
2024-05-08 17:07:33 -04:00
..
GitAnnex Added --expected-present file matching option 2024-01-25 12:56:41 -04:00
GitAnnexShell uninit: Support --json and --json-error-messages 2023-05-11 13:43:02 -04:00
Action.hs Fix display when run with -J1 2023-06-15 10:07:54 -04:00
AnnexSetter.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Batch.hs log migration trees to git-annex branch 2023-12-06 15:40:03 -04:00
GitAnnex.hs add reregisterurl command 2024-03-05 15:06:14 -04:00
GitAnnexShell.hs Override safe.bareRepository for git remotes 2023-09-07 14:56:26 -04:00
GitRemoteAnnex.hs git clone support for git-remote-annex 2024-05-08 17:07:33 -04:00
GitRemoteTorAnnex.hs fix name of gitremote-helpers 2024-05-06 12:07:05 -04:00
Option.hs initial implementation of --explain 2023-07-25 16:52:57 -04:00
Seek.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
Usage.hs add FIELD?=GLOB to git-annex view usage 2023-02-07 18:09:10 -04:00