私は、次のcomposer.json
を持っている:私は実行時にComposerを使用してシャロークローンを実行するにはどうすればよいですか?
{
"require": {
"php": ">=5.2.0",
"queueit/KnownUser.V3.PHP": "dev-master"
},
"config": {
"autoloader-suffix": "ComposerManager",
"vendor-dir": "../../../all/libraries/composer"
},
"prefer-stable": true,
"repositories": [
{
"type": "package",
"package": {
"name": "queueit/KnownUser.V3.PHP",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/queueit/KnownUser.V3.PHP.git",
"reference": "master"
}
}
}
]
}
は、しかし:
$ composer -vvv update
...
Cloning master
Executing command (CWD): git clone --no-checkout 'https://github.com/queueit/KnownUser.V3.PHP.git' '.../sites/all/libraries/composer/queueit/KnownUser.V3.PHP' && cd '.../sites/all/libraries/composer/queueit/KnownUser.V3.PHP' && git remote add composer 'https://github.com/queueit/KnownUser.V3.PHP.git' && git fetch composer
クローニングプロセスは、非常に長い時間がかかり、リポジトリのサイズは25メガバイトの上に育つ:
$ du -hs ~/.composer/cache/vcs/https---github.com-queueit-KnownUser.V3.PHP.git/
25M ~/.composer/cache/vcs/https---github.com-queueit-KnownUser.V3.PHP.git/
次に、Composerはタイムアウトで停止します。
[Symfony \ Component \ Process \ Exception \ ProcessTimedOutException]
プロセス "git clone --no-checkout 'https://github.com/queueit/KnownUser.V3.PHP.git' '.../sites/all/libraries/composer/queueit/KnownUser.V3.PHP' && cd '.../sites/all/libraries/composer/queueit/KnownUser.V3.PHP' && git remote add composer 'https://github.com/queueit/KnownUser.V3.PHP.git' && git fetch composer
"が300秒のタイムアウトを超えました。
リポジトリが大きすぎてすべてのgitオブジェクトを複製できないと仮定します。私はa shallow cloneを使用して迅速にリポジトリのクローンを作成するにはどうすればよい
?
例えば、--depth 1
または--single-branch
gitパラメータをGitコマンドに渡すことで、Composerによって自動的に選択されますか?
私は変更がcomposer.json
ファイル内の自己完結型であることを期待するので、composer install
を実行しているときに、他のシステムや他のユーザーがこのファイルを呼び出したときに外付けの構成は必要ありませんする必要があります。