git-annex/Git
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
..
Command update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Remote Removed support for git versions older than 2.1 2019-09-11 16:14:43 -04:00
AutoCorrect.hs all commands building except for assistant 2019-12-05 14:41:18 -04:00
Branch.hs Revert "multiple -m" 2024-04-02 17:29:07 -04:00
BuildVersion.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Bundle.hs add git bundle interface 2024-05-07 14:22:41 -04:00
CatFile.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
CheckAttr.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
CheckIgnore.hs more RawFilePath conversion 2020-11-03 10:11:04 -04:00
Command.hs convert some error to giveup 2021-12-09 14:36:54 -04:00
Config.hs fix some build warnings from ghc 9.4.6 2023-09-21 13:40:22 -04:00
ConfigTypes.hs Support core.sharedRepository=0xxx at long last 2023-04-26 17:03:29 -04:00
Construct.hs RawFilePath conversion 2023-10-26 13:58:49 -04:00
Credential.hs split out Utility.Url.Parse 2023-08-14 12:28:10 -04:00
CurrentRepo.hs fix some build warnings from ghc 9.4.6 2023-09-21 12:11:01 -04:00
DiffTree.hs rename Git.Filename to Git.Quote 2023-04-12 17:22:03 -04:00
DiffTreeItem.hs ByteString Ref continued 2020-04-07 11:54:27 -04:00
Env.hs convert TopFilePath to use RawFilePath 2019-12-09 15:07:21 -04:00
FileMode.hs Fix ambigous typos 2023-03-17 15:14:47 -04:00
FilePath.hs implement importChanges optimisaton (not used yet) 2023-05-31 16:01:34 -04:00
FilterProcess.hs filter-process: Fix protocol for empty files 2022-07-13 17:13:54 -04:00
Fsck.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
GCrypt.hs sync: Fix parsing of gcrypt::rsync:// urls that use a relative path 2023-03-23 15:20:00 -04:00
HashObject.hs make hashFile support paths with newlines 2023-03-13 13:43:40 -04:00
History.hs convert to withCreateProcess for async exception safety 2020-06-03 15:48:09 -04:00
Hook.hs windows hook scripts newlines without CR 2023-11-02 13:37:04 -04:00
Index.hs more RawFilePath conversion 2020-11-05 18:45:37 -04:00
LockFile.hs fix build with unix-2.8.0 2023-08-01 18:41:27 -04:00
Log.hs migrate --update gets keys 2023-12-07 17:25:56 -04:00
LsFiles.hs Apply codespell -w throughout 2023-03-17 15:14:58 -04:00
LsTree.hs rename Git.Filename to Git.Quote 2023-04-12 17:22:03 -04:00
Merge.hs sync --quiet 2021-07-19 11:28:47 -04:00
Objects.hs fix empty tree import when directory does not exist 2023-08-15 12:57:41 -04:00
PktLine.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
Queue.hs Apply codespell -w throughout 2023-03-17 15:14:58 -04:00
Quote.hs rename Git.Filename to Git.Quote 2023-04-12 17:22:03 -04:00
Ref.hs add git for-each-ref binding 2024-05-07 14:22:04 -04:00
RefLog.hs ByteString Ref continued 2020-04-07 11:54:27 -04:00
Remote.hs git clone support for git-remote-annex 2024-05-08 17:07:33 -04:00
Repair.hs fix empty tree import when directory does not exist 2023-08-15 12:57:41 -04:00
Sha.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
Ssh.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Status.hs convert TopFilePath to use RawFilePath 2019-12-09 15:07:21 -04:00
Tree.hs optimise adjustTree when adding many TreeItems (take 2) 2024-01-16 11:53:57 -04:00
Types.hs Override safe.bareRepository for git remotes 2023-09-07 14:56:26 -04:00
UnionMerge.hs fix indent for readability 2024-03-08 13:38:46 -04:00
UpdateIndex.hs rawfilepath conversion 2023-02-27 15:06:32 -04:00
Url.hs avoid partial functions in Git.Url 2021-01-18 15:07:23 -04:00
Version.hs more RawFilePath conversion 2020-10-29 12:03:50 -04:00