avm-tools 0.50.0 → 0.51.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +8 -0
- data/lib/avm/data/package/dump.rb +1 -1
- data/lib/avm/git/issue/complete/_test.rb +1 -1
- data/lib/avm/instances/configuration/_rubocop.rb +1 -1
- data/lib/avm/ruby/gems.rb +11 -0
- data/lib/avm/ruby/gems/generator.rb +168 -0
- data/lib/avm/ruby/rubocop/_gemfile.rb +1 -1
- data/lib/avm/stereotypes/eac_webapp_base0/runner/data/dump.rb +1 -1
- data/lib/avm/tools/runner/git/deploy.rb +2 -2
- data/lib/avm/tools/runner/ruby/gems.rb +22 -0
- data/lib/avm/tools/runner/ruby/gems/generate.rb +50 -0
- data/lib/avm/tools/version.rb +1 -1
- data/template/avm/ruby/gems/generator/gemspec.template +18 -0
- data/template/avm/ruby/gems/generator/root_lib.template +7 -0
- data/template/avm/ruby/gems/generator/static/Gemfile +5 -0
- data/template/avm/ruby/gems/generator/static/spec/rubocop_spec.rb +7 -0
- data/template/avm/ruby/gems/generator/static/spec/spec_helper.rb +100 -0
- data/template/avm/ruby/gems/generator/version.template +5 -0
- data/vendor/gems/eac_ruby_utils/Gemfile +16 -0
- data/vendor/gems/eac_ruby_utils/MIT-LICENCE +16 -0
- data/vendor/gems/eac_ruby_utils/README.rdoc +3 -0
- data/vendor/gems/eac_ruby_utils/eac_ruby_utils.gemspec +24 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils.rb +6 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/arguments_consumer.rb +81 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/by_reference.rb +23 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/common_concern.rb +68 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/common_constructor.rb +133 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/configs.rb +74 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/configs/file.rb +66 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/console.rb +5 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb +135 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner.rb +39 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_class_methods.rb +18 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_doc.rb +25 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_settings.rb +19 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_subcommands.rb +139 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/console/speaker.rb +133 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/_class_methods.rb +39 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/_constants.rb +14 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/list.rb +63 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/console/speaker/node.rb +26 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/contextualizable.rb +16 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/core_ext.rb +5 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/custom_format.rb +53 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/envs.rb +23 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/envs/base_env.rb +28 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/envs/command.rb +168 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/envs/command/extra_options.rb +46 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/envs/executable.rb +51 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/envs/file.rb +22 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/envs/local_env.rb +17 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/envs/process.rb +19 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/envs/spawn.rb +32 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/envs/ssh_env.rb +72 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/filesystem_cache.rb +53 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/fs.rb +9 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/fs/extname.rb +30 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/fs/temp.rb +52 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/fs/temp/directory.rb +16 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/fs/temp/file.rb +34 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/fs/traversable.rb +47 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/fs/traverser.rb +74 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/fs_cache.rb +11 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/listable.rb +17 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/listable/class_methods.rb +14 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/listable/instance_methods.rb +30 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/listable/integer_list.rb +23 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/listable/list.rb +93 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/listable/lists.rb +59 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/listable/string_list.rb +19 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/listable/symbol_list.rb +19 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/listable/value.rb +38 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/on_clean_ruby_environment.rb +12 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/options_consumer.rb +62 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patch.rb +11 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches.rb +4 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/class.rb +4 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/class/common_constructor.rb +9 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerable.rb +4 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerable/boolean_combinations.rb +45 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/hash.rb +5 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/options_consumer.rb +10 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/hash/sym_keys_hash.rb +10 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/module.rb +4 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/module/common_concern.rb +10 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/module/console_speaker.rb +10 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/module/listable.rb +10 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/module/patch.rb +9 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/module/require_sub.rb +9 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/module/simple_cache.rb +10 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/object.rb +5 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/object/asserts.rb +14 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_present.rb +19 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/object/template.rb +16 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/object/to_pathname.rb +15 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname.rb +4 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_sub.rb +9 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp.rb +4 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/if_match.rb +16 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/time.rb +4 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/time/default_time_zone_set.rb +5 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/patches/time/local_time_zone.rb +25 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/paths_hash.rb +93 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/require_sub.rb +54 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/rspec.rb +9 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/rspec/conditional.rb +38 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/rspec/stubbed_ssh.rb +44 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/ruby.rb +9 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/ruby/command.rb +31 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_clean_environment.rb +26 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/settings_provider.rb +65 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/simple_cache.rb +42 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/templates.rb +9 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/templates/directory.rb +110 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/templates/file.rb +50 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/templates/searcher.rb +55 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_not_found_error.rb +7 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_providers.rb +25 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_providers/base.rb +23 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_providers/entries_reader.rb +25 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_providers/generic.rb +25 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/templates/variable_providers/hash.rb +29 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/version.rb +5 -0
- data/vendor/gems/eac_ruby_utils/lib/eac_ruby_utils/yaml.rb +96 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb +17 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/common_concern_spec.rb +42 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/common_constructor_spec.rb +37 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/configs_spec.rb +31 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/console/configs_spec.rb +14 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/console/docopt_runner_spec.rb +136 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/console/speaker_spec.rb +36 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/custom_format_spec.rb +60 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/executable_spec.rb +37 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/ssh_env_spec.rb +25 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/filesystem_cache_spec.rb +32 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/extname_spec.rb +18 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp/temp_spec.rb +12 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp_spec.rb +52 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/listable_spec.rb +212 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/options_consumer_spec.rb +45 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerable/boolean_combinations_spec.rb +39 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/options_consumer_spec.rb +17 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/hash/sym_keys_hash_spec.rb +13 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/console_speaker_spec.rb +13 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/listable_spec.rb +13 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/simple_cache_spec.rb +13 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/if_present_spec.rb +13 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/template_spec.rb +23 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/object/template_spec_files/path/my_stub_with_template +1 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_sub_spec.rb +17 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/paths_hash_spec.rb +49 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub_spec.rb +19 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub_spec/stubbed_module_a.rb +6 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub_spec/stubbed_not_module.rb +6 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/ruby_spec.rb +22 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/settings_provider_spec.rb +46 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/simple_cache_spec.rb +102 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/file_spec.rb +35 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/file_spec_files/expected_content +2 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/file_spec_files/source.template +2 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/searcher_spec.rb +30 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/searcher_spec_files/path1/subdir1/file1.template +1 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/searcher_spec_files/path1/subdir1/file2 +1 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/searcher_spec_files/path2/subdir1/file3.template +1 -0
- data/vendor/gems/eac_ruby_utils/spec/lib/eac_ruby_utils/yaml_spec.rb +75 -0
- data/vendor/gems/eac_ruby_utils/spec/locales/pt-BR.yml +55 -0
- data/vendor/gems/eac_ruby_utils/spec/rubocop_check_spec.rb +7 -0
- data/vendor/gems/eac_ruby_utils/spec/spec_helper.rb +12 -0
- data/vendor/git-subrepo/Changes +51 -0
- data/vendor/git-subrepo/Intro.pod +508 -0
- data/vendor/git-subrepo/License +21 -0
- data/vendor/git-subrepo/Makefile +80 -0
- data/vendor/git-subrepo/Meta +28 -0
- data/vendor/git-subrepo/ReadMe.pod +695 -0
- data/vendor/git-subrepo/doc/comparison.swim +35 -0
- data/vendor/git-subrepo/doc/git-subrepo.swim +611 -0
- data/vendor/git-subrepo/doc/intro-to-subrepo.swim +387 -0
- data/vendor/git-subrepo/ext/bashplus/Changes +15 -0
- data/vendor/git-subrepo/ext/bashplus/License +21 -0
- data/vendor/git-subrepo/ext/bashplus/Makefile +45 -0
- data/vendor/git-subrepo/ext/bashplus/Meta +28 -0
- data/vendor/git-subrepo/ext/bashplus/ReadMe.pod +77 -0
- data/vendor/git-subrepo/ext/bashplus/bin/bash+ +43 -0
- data/vendor/git-subrepo/ext/bashplus/doc/bash+.swim +61 -0
- data/vendor/git-subrepo/ext/bashplus/lib/bash+.bash +92 -0
- data/vendor/git-subrepo/ext/bashplus/man/man1/bash+.1 +134 -0
- data/vendor/git-subrepo/ext/bashplus/man/man3/bash+.3 +134 -0
- data/vendor/git-subrepo/ext/bashplus/test/base.t +12 -0
- data/vendor/git-subrepo/ext/bashplus/test/fcopy.t +22 -0
- data/vendor/git-subrepo/ext/bashplus/test/lib/foo/bar.bash +3 -0
- data/vendor/git-subrepo/ext/bashplus/test/lib/foo/foo.bash +3 -0
- data/vendor/git-subrepo/ext/bashplus/test/source-bash+-std.t +18 -0
- data/vendor/git-subrepo/ext/bashplus/test/source-bash+.t +23 -0
- data/vendor/git-subrepo/ext/bashplus/test/test.bash +70 -0
- data/vendor/git-subrepo/ext/bashplus/test/use.t +19 -0
- data/vendor/git-subrepo/ext/test-more-bash/Changes +15 -0
- data/vendor/git-subrepo/ext/test-more-bash/License +21 -0
- data/vendor/git-subrepo/ext/test-more-bash/Makefile +20 -0
- data/vendor/git-subrepo/ext/test-more-bash/Meta +30 -0
- data/vendor/git-subrepo/ext/test-more-bash/ReadMe.pod +115 -0
- data/vendor/git-subrepo/ext/test-more-bash/doc/test-more.swim +89 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Changes +15 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/License +21 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Makefile +45 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Meta +28 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/ReadMe.pod +77 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/bin/bash+ +43 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/doc/bash+.swim +61 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/lib/bash+.bash +92 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man1/bash+.1 +134 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man3/bash+.3 +134 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/base.t +12 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/fcopy.t +22 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/lib/foo/bar.bash +3 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/lib/foo/foo.bash +3 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+-std.t +18 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+.t +23 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/test.bash +70 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/use.t +19 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Changes +15 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/License +21 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Makefile +37 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Meta +28 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/ReadMe.pod +66 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/doc/test-tap.swim +48 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/lib/test/tap.bash +153 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/man/man3/test-tap.3 +119 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/bail_out.t +13 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/done.t +10 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail.t +20 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail_fast.t +15 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/helper.bash +9 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/pass.t +9 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/plan.t +10 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/skip_all.t +20 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/tap.t +13 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/bail.t +14 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/fail.t +7 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/fail_fast.t +12 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/skip-all-init.t +8 -0
- data/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/skip-all-plan.t +9 -0
- data/vendor/git-subrepo/ext/test-more-bash/lib/test/more.bash +95 -0
- data/vendor/git-subrepo/ext/test-more-bash/man/man3/test-more.3 +173 -0
- data/vendor/git-subrepo/ext/test-more-bash/test/fail.t +20 -0
- data/vendor/git-subrepo/ext/test-more-bash/test/more.t +20 -0
- data/vendor/git-subrepo/ext/test-more-bash/test/pass.t +9 -0
- data/vendor/git-subrepo/ext/test-more-bash/test/setup +8 -0
- data/vendor/git-subrepo/ext/test-more-bash/test/skip_all.t +11 -0
- data/vendor/git-subrepo/ext/test-more-bash/test/test/fail1.t +12 -0
- data/vendor/git-subrepo/ext/test-more-bash/test/test/skip_all.t +10 -0
- data/vendor/git-subrepo/lib/git-subrepo +1891 -0
- data/vendor/git-subrepo/lib/git-subrepo.d/help-functions.bash +343 -0
- data/vendor/git-subrepo/man/man1/git-subrepo.1 +746 -0
- data/vendor/git-subrepo/note/0.4.0 +12 -0
- data/vendor/git-subrepo/note/AllGitCmds +148 -0
- data/vendor/git-subrepo/note/Cases +32 -0
- data/vendor/git-subrepo/note/Commands +33 -0
- data/vendor/git-subrepo/note/Dags +199 -0
- data/vendor/git-subrepo/note/Gists +7 -0
- data/vendor/git-subrepo/note/Links +25 -0
- data/vendor/git-subrepo/note/Plugins +10 -0
- data/vendor/git-subrepo/note/Spec +39 -0
- data/vendor/git-subrepo/note/Story1 +57 -0
- data/vendor/git-subrepo/note/ToDo +55 -0
- data/vendor/git-subrepo/note/design.swim +137 -0
- data/vendor/git-subrepo/note/design2.swim +85 -0
- data/vendor/git-subrepo/note/init-test +38 -0
- data/vendor/git-subrepo/note/pull-dance.txt +18 -0
- data/vendor/git-subrepo/note/recreate-rebase-conflict.sh +56 -0
- data/vendor/git-subrepo/note/subtree-rebase-fail-example/test.bash +29 -0
- data/vendor/git-subrepo/note/test-subrepo-push.sh +69 -0
- data/vendor/git-subrepo/note/test.sh +58 -0
- data/vendor/git-subrepo/pkg/bin/generate-completion.pl +210 -0
- data/vendor/git-subrepo/pkg/bin/generate-help-functions.pl +89 -0
- data/vendor/git-subrepo/share/completion.bash +42 -0
- data/vendor/git-subrepo/share/enable-completion.sh +50 -0
- data/vendor/git-subrepo/share/git-completion.bash +2738 -0
- data/vendor/git-subrepo/share/zsh-completion/_git-subrepo +82 -0
- data/vendor/git-subrepo/test/branch-all.t +41 -0
- data/vendor/git-subrepo/test/branch-rev-list-one-path.t +43 -0
- data/vendor/git-subrepo/test/branch-rev-list.t +47 -0
- data/vendor/git-subrepo/test/branch.t +52 -0
- data/vendor/git-subrepo/test/clean.t +43 -0
- data/vendor/git-subrepo/test/clone-annotated-tag.t +45 -0
- data/vendor/git-subrepo/test/clone.t +107 -0
- data/vendor/git-subrepo/test/compile.t +19 -0
- data/vendor/git-subrepo/test/config.t +58 -0
- data/vendor/git-subrepo/test/encode.t +91 -0
- data/vendor/git-subrepo/test/error.t +171 -0
- data/vendor/git-subrepo/test/fetch.t +43 -0
- data/vendor/git-subrepo/test/gitignore.t +61 -0
- data/vendor/git-subrepo/test/init.t +64 -0
- data/vendor/git-subrepo/test/issue29.t +98 -0
- data/vendor/git-subrepo/test/issue95.t +98 -0
- data/vendor/git-subrepo/test/issue96.t +96 -0
- data/vendor/git-subrepo/test/pull-all.t +38 -0
- data/vendor/git-subrepo/test/pull-merge.t +113 -0
- data/vendor/git-subrepo/test/pull-message.t +88 -0
- data/vendor/git-subrepo/test/pull-new-branch.t +58 -0
- data/vendor/git-subrepo/test/pull-ours.t +90 -0
- data/vendor/git-subrepo/test/pull-theirs.t +82 -0
- data/vendor/git-subrepo/test/pull-twice.t +44 -0
- data/vendor/git-subrepo/test/pull.t +99 -0
- data/vendor/git-subrepo/test/push-after-init.t +51 -0
- data/vendor/git-subrepo/test/push-force.t +56 -0
- data/vendor/git-subrepo/test/push-new-branch.t +61 -0
- data/vendor/git-subrepo/test/push-no-changes.t +29 -0
- data/vendor/git-subrepo/test/push-squash.t +56 -0
- data/vendor/git-subrepo/test/push.t +176 -0
- data/vendor/git-subrepo/test/reclone.t +45 -0
- data/vendor/git-subrepo/test/repo/bar/HEAD +1 -0
- data/vendor/git-subrepo/test/repo/bar/config +4 -0
- data/vendor/git-subrepo/test/repo/bar/objects/1f/0c4b264caed0126814a0ede851a1e0b4e16ae6 +0 -0
- data/vendor/git-subrepo/test/repo/bar/objects/87/46903fdb1b9c2101377880125917c2e05b4d69 +0 -0
- data/vendor/git-subrepo/test/repo/bar/objects/94/c86ffc745232d89f78c6f895e11e71272518db +0 -0
- data/vendor/git-subrepo/test/repo/bar/objects/c6/76c57b6576743fa56278527aa60ebd2e202a7c +0 -0
- data/vendor/git-subrepo/test/repo/bar/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
- data/vendor/git-subrepo/test/repo/bar/objects/f6/2a8ff3feadf39b0a98f1a86ec6d1eb33858ee9 +0 -0
- data/vendor/git-subrepo/test/repo/bar/refs/heads/master +1 -0
- data/vendor/git-subrepo/test/repo/bar/refs/tags/A +1 -0
- data/vendor/git-subrepo/test/repo/foo/HEAD +1 -0
- data/vendor/git-subrepo/test/repo/foo/config +4 -0
- data/vendor/git-subrepo/test/repo/foo/objects/a0/f4cdaaf533a936296cdebbed8206c3b9ededa8 +0 -0
- data/vendor/git-subrepo/test/repo/foo/objects/e2/1291a1ad392a9d4c51dd9586804f1467b28afd +0 -0
- data/vendor/git-subrepo/test/repo/foo/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
- data/vendor/git-subrepo/test/repo/foo/refs/heads/master +1 -0
- data/vendor/git-subrepo/test/repo/init/HEAD +1 -0
- data/vendor/git-subrepo/test/repo/init/config +5 -0
- data/vendor/git-subrepo/test/repo/init/objects/11/523f5dcf03b4c89b592dc8a3d0308f68da2386 +0 -0
- data/vendor/git-subrepo/test/repo/init/objects/14/2addf8ec5f37334e837440122c62f2c68a29ad +0 -0
- data/vendor/git-subrepo/test/repo/init/objects/32/5180321750a21cd7a4e7ecda319e557a4f6a09 +2 -0
- data/vendor/git-subrepo/test/repo/init/objects/3d/918c6901c02f43af5d31779dd5e1f9166aeb36 +0 -0
- data/vendor/git-subrepo/test/repo/init/objects/3e/4cb596066dce63ba4d047abddb677389b65e19 +0 -0
- data/vendor/git-subrepo/test/repo/init/objects/4b/6e53022e7a04f07887697e4f3d7c377fd9822b +0 -0
- data/vendor/git-subrepo/test/repo/init/objects/58/931fc1bd559b59c41ea738fc7ad04f9ad01bd3 +0 -0
- data/vendor/git-subrepo/test/repo/init/objects/5e/c0c28e1b806f25efdca18fcf7a74b49c3755bd +0 -0
- data/vendor/git-subrepo/test/repo/init/objects/75/fa6584e748f57eff06eebdc55e9ac21d4fcbf2 +1 -0
- data/vendor/git-subrepo/test/repo/init/objects/80/2d5edbd5e1cb7fca82b5bd38e7c8a0a496fb20 +0 -0
- data/vendor/git-subrepo/test/repo/init/objects/94/7b3d714c38791e95ad6f928b48c98bb8708acd +0 -0
- data/vendor/git-subrepo/test/repo/init/objects/95/e1f2df3f4d5f3d7a60588c25a7ca8a913d3c2a +1 -0
- data/vendor/git-subrepo/test/repo/init/objects/b1/5f4a7666baf40d949548ead946a3370e273479 +0 -0
- data/vendor/git-subrepo/test/repo/init/objects/c3/ee8978c4c5d84c3b7d00ba8e5906933d027882 +0 -0
- data/vendor/git-subrepo/test/repo/init/objects/c8/b0bffbc405ef3fad7354ff833fbec36d67ddfa +3 -0
- data/vendor/git-subrepo/test/repo/init/objects/dd/8bdb934ec848137f011fe423b185505c343626 +2 -0
- data/vendor/git-subrepo/test/repo/init/objects/e2/9be58c767cfeb27235c995d293a7d71aac0135 +2 -0
- data/vendor/git-subrepo/test/repo/init/objects/ee/1224401fc6aac595145fa727dcf6706ac8aec1 +1 -0
- data/vendor/git-subrepo/test/repo/init/objects/f1/cc1a657b2e805c400f5dcaaa76bd29c6178b1b +0 -0
- data/vendor/git-subrepo/test/repo/init/refs/heads/master +1 -0
- data/vendor/git-subrepo/test/setup +205 -0
- data/vendor/git-subrepo/test/status.t +68 -0
- data/vendor/git-subrepo/test/submodule.t +45 -0
- metadata +349 -6
@@ -0,0 +1,343 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
# DO NOT EDIT. This file generated by pkg/bin/generate-help-functions.pl.
|
4
|
+
|
5
|
+
set -e
|
6
|
+
|
7
|
+
help:all() {
|
8
|
+
cat <<'...'
|
9
|
+
branch branch <subdir>|--all [-f] [-F]
|
10
|
+
clean clean <subdir>|--all|--ALL [-f]
|
11
|
+
clone clone <repository> [<subdir>] [-b <branch>] [-f] [-m <msg>] [-e] [--method <merge|rebase>]
|
12
|
+
commit commit <subdir> [<subrepo-ref>] [-m <msg>] [-e] [-f] [-F]
|
13
|
+
config config <subdir> <option> [<value>] [-f]
|
14
|
+
fetch fetch <subdir>|--all [-r <remote>] [-b <branch>]
|
15
|
+
help help [<command>|--all]
|
16
|
+
init init <subdir> [-r <remote>] [-b <branch>] [--method <merge|rebase>]
|
17
|
+
pull pull <subdir>|--all [-M|-R|-f] [-m <msg>] [-e] [-b <branch>] [-r <remote>] [-u]
|
18
|
+
push push <subdir>|--all [<branch>] [-r <remote>] [-b <branch>] [-M|-R] [-u] [-f] [-s] [-N]
|
19
|
+
status status [<subdir>|--all|--ALL] [-F] [-q|-v]
|
20
|
+
upgrade upgrade
|
21
|
+
version version [-q|-v]
|
22
|
+
...
|
23
|
+
}
|
24
|
+
|
25
|
+
help:branch() {
|
26
|
+
cat <<'...'
|
27
|
+
|
28
|
+
Usage: git subrepo branch <subdir>|--all [-f] [-F]
|
29
|
+
|
30
|
+
|
31
|
+
Create a branch with local subrepo commits.
|
32
|
+
|
33
|
+
Scan the history of the mainline for all the commits that affect the `subdir`
|
34
|
+
and create a new branch from them called `subrepo/<subdir>`.
|
35
|
+
|
36
|
+
This is useful for doing `pull` and `push` commands by hand.
|
37
|
+
|
38
|
+
Use the `--force` option to write over an existing `subrepo/<subdir>` branch.
|
39
|
+
|
40
|
+
The `branch` command accepts the `--all`, `--fetch` and `--force` options.
|
41
|
+
...
|
42
|
+
}
|
43
|
+
|
44
|
+
help:clean() {
|
45
|
+
cat <<'...'
|
46
|
+
|
47
|
+
Usage: git subrepo clean <subdir>|--all|--ALL [-f]
|
48
|
+
|
49
|
+
|
50
|
+
Remove artifacts created by `fetch` and `branch` commands.
|
51
|
+
|
52
|
+
The `fetch` and `branch` operations (and other commands that call them)
|
53
|
+
create temporary things like refs, branches and remotes. This command
|
54
|
+
removes all those things.
|
55
|
+
|
56
|
+
Use `--force` to remove refs. Refs are not removed by default because they
|
57
|
+
are sometimes needed between commands.
|
58
|
+
|
59
|
+
Use `--all` to clean up after all the current subrepos. Sometimes you might
|
60
|
+
change to a branch where a subrepo doesn't exist, and then `--all` won't find
|
61
|
+
it. Use `--ALL` to remove any artifacts that were ever created by subrepo.
|
62
|
+
|
63
|
+
To remove ALL subrepo artifacts:
|
64
|
+
|
65
|
+
git subrepo clean --ALL --force
|
66
|
+
|
67
|
+
The `clean` command accepts the `--all`, `--ALL`, and `--force` options.
|
68
|
+
...
|
69
|
+
}
|
70
|
+
|
71
|
+
help:clone() {
|
72
|
+
cat <<'...'
|
73
|
+
|
74
|
+
Usage: git subrepo clone <repository> [<subdir>] [-b <branch>] [-f] [-m <msg>] [-e] [--method <merge|rebase>]
|
75
|
+
|
76
|
+
|
77
|
+
Add a repository as a subrepo in a subdir of your repository.
|
78
|
+
|
79
|
+
This is similar in feel to `git clone`. You just specify the remote repo
|
80
|
+
url, and optionally a sub-directory and/or branch name. The repo will be
|
81
|
+
fetched and merged into the subdir.
|
82
|
+
|
83
|
+
The subrepo history is /squashed/ into a single commit that contains the
|
84
|
+
reference information. This information is also stored in a special file
|
85
|
+
called `<subdir>/.gitrepo`. The presence of this file indicates that the
|
86
|
+
directory is a subrepo.
|
87
|
+
|
88
|
+
All subsequent commands refer to the subrepo by the name of the /subdir/.
|
89
|
+
From the subdir, all the current information about the subrepo can be
|
90
|
+
obtained.
|
91
|
+
|
92
|
+
The `--force` option will "reclone" (completely replace) an existing subdir.
|
93
|
+
|
94
|
+
The `--method` option will decide how the join process between branches are
|
95
|
+
performed. The default option is merge.
|
96
|
+
|
97
|
+
The `clone` command accepts the `--branch=` `--edit`, `--force` and
|
98
|
+
`--message=` options.
|
99
|
+
...
|
100
|
+
}
|
101
|
+
|
102
|
+
help:commit() {
|
103
|
+
cat <<'...'
|
104
|
+
|
105
|
+
Usage: git subrepo commit <subdir> [<subrepo-ref>] [-m <msg>] [-e] [-f] [-F]
|
106
|
+
|
107
|
+
|
108
|
+
Add subrepo branch to current history as a single commit.
|
109
|
+
|
110
|
+
This command is generally used after a hand-merge. You have done a `subrepo
|
111
|
+
branch` and merged (rebased) it with the upstream. This command takes the
|
112
|
+
HEAD of that branch, puts its content into the subrepo subdir and adds a new
|
113
|
+
commit for it to the top of your mainline history.
|
114
|
+
|
115
|
+
This command requires that the upstream HEAD be in the `subrepo/<subdir>`
|
116
|
+
branch history. That way the same branch can push upstream. Use the
|
117
|
+
`--force` option to commit anyway.
|
118
|
+
|
119
|
+
The `commit` command accepts the `--edit`, `--fetch`, `--force` and
|
120
|
+
`--message=` options.
|
121
|
+
...
|
122
|
+
}
|
123
|
+
|
124
|
+
help:config() {
|
125
|
+
cat <<'...'
|
126
|
+
|
127
|
+
Usage: git subrepo config <subdir> <option> [<value>] [-f]
|
128
|
+
|
129
|
+
|
130
|
+
Read or update configuration values in the subdir/.gitrepo file.
|
131
|
+
|
132
|
+
Because most of the values stored in the .gitrepo file are generated you
|
133
|
+
will need to use `--force` if you want to change anything else then the
|
134
|
+
`method` option.
|
135
|
+
|
136
|
+
Example to update the `method` option for a subrepo:
|
137
|
+
|
138
|
+
git subrepo config foo method rebase
|
139
|
+
...
|
140
|
+
}
|
141
|
+
|
142
|
+
help:fetch() {
|
143
|
+
cat <<'...'
|
144
|
+
|
145
|
+
Usage: git subrepo fetch <subdir>|--all [-r <remote>] [-b <branch>]
|
146
|
+
|
147
|
+
|
148
|
+
Fetch the remote/upstream content for a subrepo.
|
149
|
+
|
150
|
+
It will create a Git reference called `subrepo/<subdir>/fetch` that points at
|
151
|
+
the same commit as `FETCH_HEAD`. It will also create a remote called
|
152
|
+
`subrepo/<subdir>`. These are temporary and you can easily remove them with
|
153
|
+
the subrepo `clean` command.
|
154
|
+
|
155
|
+
The `fetch` command accepts the `--all`, `--branch=` and `--remote=` options.
|
156
|
+
...
|
157
|
+
}
|
158
|
+
|
159
|
+
help:help() {
|
160
|
+
cat <<'...'
|
161
|
+
|
162
|
+
Usage: git subrepo help [<command>|--all]
|
163
|
+
|
164
|
+
|
165
|
+
Same as `git help subrepo`. Will launch the manpage. For the shorter usage,
|
166
|
+
use `git subrepo -h`.
|
167
|
+
|
168
|
+
Use `git subrepo help <command> to get help for a specific command. Use
|
169
|
+
`--all` to get a summary of all commands.
|
170
|
+
|
171
|
+
The `help` command accepts the `--all` option.
|
172
|
+
...
|
173
|
+
}
|
174
|
+
|
175
|
+
help:init() {
|
176
|
+
cat <<'...'
|
177
|
+
|
178
|
+
Usage: git subrepo init <subdir> [-r <remote>] [-b <branch>] [--method <merge|rebase>]
|
179
|
+
|
180
|
+
|
181
|
+
Turn an existing subdirectory into a subrepo.
|
182
|
+
|
183
|
+
If you want to expose a subdirectory of your project as a published subrepo,
|
184
|
+
this command will do that. It will split out the content of a normal
|
185
|
+
subdirectory into a branch and start tracking it as a subrepo. Afterwards
|
186
|
+
your original repo will look exactly the same except that there will be a
|
187
|
+
`<subdir>/.gitrepo` file.
|
188
|
+
|
189
|
+
If you specify the `--remote` (and optionally the `--branch`) option, the
|
190
|
+
values will be added to the `<subdir>/.gitrepo` file. The `--remote` option
|
191
|
+
is the upstream URL, and the `--branch` option is the upstream branch to push
|
192
|
+
to. These values will be needed to do a `git subrepo push` command, but they
|
193
|
+
can be provided later on the `push` command (and saved to `<subdir>/.gitrepo`
|
194
|
+
if you also specify the `--update` option).
|
195
|
+
|
196
|
+
Note: You will need to create the empty upstream repo and push to it on your
|
197
|
+
own, using `git subrepo push <subdir>`.
|
198
|
+
|
199
|
+
The `--method` option will decide how the join process between branches
|
200
|
+
are performed. The default option is merge.
|
201
|
+
|
202
|
+
The `init` command accepts the `--branch=` and `--remote=` options.
|
203
|
+
...
|
204
|
+
}
|
205
|
+
|
206
|
+
help:pull() {
|
207
|
+
cat <<'...'
|
208
|
+
|
209
|
+
Usage: git subrepo pull <subdir>|--all [-M|-R|-f] [-m <msg>] [-e] [-b <branch>] [-r <remote>] [-u]
|
210
|
+
|
211
|
+
|
212
|
+
Update the subrepo subdir with the latest upstream changes.
|
213
|
+
|
214
|
+
The `pull` command fetches the latest content from the remote branch pointed
|
215
|
+
to by the subrepo's `.gitrepo` file, and then tries to merge the changes into
|
216
|
+
the corresponding subdir. It does this by making a branch of the local
|
217
|
+
commits to the subdir and then merging or rebasing (see below) it with the
|
218
|
+
fetched upstream content. After the merge, the content of the new branch
|
219
|
+
replaces your subdir, the `.gitrepo` file is updated and a single 'pull'
|
220
|
+
commit is added to your mainline history.
|
221
|
+
|
222
|
+
The `pull` command will attempt to do the following commands in one go:
|
223
|
+
|
224
|
+
git subrepo fetch <subdir>
|
225
|
+
git subrepo branch <subdir>
|
226
|
+
git merge/rebase subrepo/<subdir>/fetch subrepo/<subdir>
|
227
|
+
git subrepo commit <subdir>
|
228
|
+
# Only needed for a consequential push:
|
229
|
+
git update-ref refs/subrepo/<subdir>/pull subrepo/<subdir>
|
230
|
+
|
231
|
+
In other words, you could do all the above commands yourself, for the same
|
232
|
+
effect. If any of the commands fail, subrepo will stop and tell you to finish
|
233
|
+
this by hand. Generally a failure would be in the merge or rebase part, where
|
234
|
+
conflicts can happen. Since Git has lots of ways to resolve conflicts to your
|
235
|
+
personal tastes, the subrepo command defers to letting you do this by hand.
|
236
|
+
|
237
|
+
When pulling new data, the method selected in clone/init is used. This has
|
238
|
+
no effect on the final result of the pull, since it becomes a single commit.
|
239
|
+
But it does affect the resulting `subrepo/<subdir>` branch, which is often
|
240
|
+
used for a subrepo `push` command. See 'push' below for more information.
|
241
|
+
If you want to change the method you can use the `config` command for this.
|
242
|
+
|
243
|
+
When you pull you can assume a fast-forward strategy (default) or you can
|
244
|
+
specify a `--rebase`, `--merge` or `--force` strategy. The latter is the same
|
245
|
+
as a `clone --force` operation, using the current remote and branch.
|
246
|
+
|
247
|
+
When you pull you can assume a fast-forward strategy (default) or you can
|
248
|
+
specify a `--rebase`, `--merge` or `--force` strategy. The latter is the same
|
249
|
+
as a `clone --force` operation, using the current remote and branch.
|
250
|
+
|
251
|
+
Like the `clone` command, `pull` will squash all the changes (since the last
|
252
|
+
pull or clone) into one commit. This keeps your mainline history nice and
|
253
|
+
clean. You can easily see the subrepo's history with the `git log` command:
|
254
|
+
|
255
|
+
git log refs/subrepo/<subdir>/fetch
|
256
|
+
|
257
|
+
The set of commands used above are described in detail below.
|
258
|
+
|
259
|
+
The `pull` command accepts the `--all`, `--branch=`, `--edit`, `--force`,
|
260
|
+
`--message=`, `--remote=` and `--update` options.
|
261
|
+
...
|
262
|
+
}
|
263
|
+
|
264
|
+
help:push() {
|
265
|
+
cat <<'...'
|
266
|
+
|
267
|
+
Usage: git subrepo push <subdir>|--all [<branch>] [-r <remote>] [-b <branch>] [-M|-R] [-u] [-f] [-s] [-N]
|
268
|
+
|
269
|
+
|
270
|
+
Push a properly merged subrepo branch back upstream.
|
271
|
+
|
272
|
+
This command takes the subrepo branch from a successful pull command and
|
273
|
+
pushes the history back to its designated remote and branch. You can also use
|
274
|
+
the `branch` command and merge things yourself before pushing if you want to
|
275
|
+
(although that is probably a rare use case).
|
276
|
+
|
277
|
+
The `push` command requires a branch that has been properly merged/rebased
|
278
|
+
with the upstream HEAD (unless the upstream HEAD is empty, which is common
|
279
|
+
when doing a first `push` after an `init`). That means the upstream HEAD is
|
280
|
+
one of the commits in the branch.
|
281
|
+
|
282
|
+
By default the branch ref `refs/subrepo/<subdir>/pull` will be pushed, but
|
283
|
+
you can specify a (properly merged) branch to push.
|
284
|
+
|
285
|
+
After that, the `push` command just checks that the branch contains the
|
286
|
+
upstream HEAD and then pushes it upstream.
|
287
|
+
|
288
|
+
The `--force` option will do a force push. Force pushes are typically
|
289
|
+
discouraged. Only use this option if you fully understand it. (The `--force`
|
290
|
+
option will NOT check for a proper merge. ANY branch will be force pushed!)
|
291
|
+
|
292
|
+
The `push` command accepts the `--all`, `--branch=`, `--dry-run`, `--force`,
|
293
|
+
`--merge`, `--rebase`, `--remote=`, `--squash` and `--update` options.
|
294
|
+
...
|
295
|
+
}
|
296
|
+
|
297
|
+
help:status() {
|
298
|
+
cat <<'...'
|
299
|
+
|
300
|
+
Usage: git subrepo status [<subdir>|--all|--ALL] [-F] [-q|-v]
|
301
|
+
|
302
|
+
|
303
|
+
Get the status of a subrepo. Uses the `--all` option by default. If the
|
304
|
+
`--quiet` flag is used, just print the subrepo names, one per line.
|
305
|
+
|
306
|
+
The `--verbose` option will show all the recent local and upstream commits.
|
307
|
+
|
308
|
+
Use `--ALL` to show the subrepos of the subrepos (ie the "subsubrepos"), if
|
309
|
+
any.
|
310
|
+
|
311
|
+
The `status` command accepts the `--all`, `--ALL`, `--fetch`, `--quiet` and
|
312
|
+
`--verbose` options.
|
313
|
+
...
|
314
|
+
}
|
315
|
+
|
316
|
+
help:upgrade() {
|
317
|
+
cat <<'...'
|
318
|
+
|
319
|
+
Usage: git subrepo upgrade
|
320
|
+
|
321
|
+
|
322
|
+
Upgrade the `git-subrepo` software itself. This simply does a `git pull` on
|
323
|
+
the git repository that the code is running from. It only works if you are on
|
324
|
+
the `master` branch. It won't work if you installed `git-subrepo` using `make
|
325
|
+
install`; in that case you'll need to `make install` from the latest code.
|
326
|
+
...
|
327
|
+
}
|
328
|
+
|
329
|
+
help:version() {
|
330
|
+
cat <<'...'
|
331
|
+
|
332
|
+
Usage: git subrepo version [-q|-v]
|
333
|
+
|
334
|
+
|
335
|
+
This command will display version information about git-subrepo and its
|
336
|
+
environment. For just the version number, use `git subrepo --version`. Use
|
337
|
+
`--verbose` for more version info, and `--quiet` for less.
|
338
|
+
|
339
|
+
The `version` command accepts the `--quiet` and `--verbose` options.
|
340
|
+
...
|
341
|
+
}
|
342
|
+
|
343
|
+
# vim: set sw=2 lisp:
|
@@ -0,0 +1,746 @@
|
|
1
|
+
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.29)
|
2
|
+
.\"
|
3
|
+
.\" Standard preamble:
|
4
|
+
.\" ========================================================================
|
5
|
+
.de Sp \" Vertical space (when we can't use .PP)
|
6
|
+
.if t .sp .5v
|
7
|
+
.if n .sp
|
8
|
+
..
|
9
|
+
.de Vb \" Begin verbatim text
|
10
|
+
.ft CW
|
11
|
+
.nf
|
12
|
+
.ne \\$1
|
13
|
+
..
|
14
|
+
.de Ve \" End verbatim text
|
15
|
+
.ft R
|
16
|
+
.fi
|
17
|
+
..
|
18
|
+
.\" Set up some character translations and predefined strings. \*(-- will
|
19
|
+
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
20
|
+
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
21
|
+
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
22
|
+
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
23
|
+
.\" nothing in troff, for use with C<>.
|
24
|
+
.tr \(*W-
|
25
|
+
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
26
|
+
.ie n \{\
|
27
|
+
. ds -- \(*W-
|
28
|
+
. ds PI pi
|
29
|
+
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
30
|
+
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
31
|
+
. ds L" ""
|
32
|
+
. ds R" ""
|
33
|
+
. ds C` ""
|
34
|
+
. ds C' ""
|
35
|
+
'br\}
|
36
|
+
.el\{\
|
37
|
+
. ds -- \|\(em\|
|
38
|
+
. ds PI \(*p
|
39
|
+
. ds L" ``
|
40
|
+
. ds R" ''
|
41
|
+
. ds C`
|
42
|
+
. ds C'
|
43
|
+
'br\}
|
44
|
+
.\"
|
45
|
+
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
46
|
+
.ie \n(.g .ds Aq \(aq
|
47
|
+
.el .ds Aq '
|
48
|
+
.\"
|
49
|
+
.\" If the F register is turned on, we'll generate index entries on stderr for
|
50
|
+
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
51
|
+
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
52
|
+
.\" output yourself in some meaningful fashion.
|
53
|
+
.\"
|
54
|
+
.\" Avoid warning from groff about undefined register 'F'.
|
55
|
+
.de IX
|
56
|
+
..
|
57
|
+
.nr rF 0
|
58
|
+
.if \n(.g .if rF .nr rF 1
|
59
|
+
.if (\n(rF:(\n(.g==0)) \{
|
60
|
+
. if \nF \{
|
61
|
+
. de IX
|
62
|
+
. tm Index:\\$1\t\\n%\t"\\$2"
|
63
|
+
..
|
64
|
+
. if !\nF==2 \{
|
65
|
+
. nr % 0
|
66
|
+
. nr F 2
|
67
|
+
. \}
|
68
|
+
. \}
|
69
|
+
.\}
|
70
|
+
.rr rF
|
71
|
+
.\" ========================================================================
|
72
|
+
.\"
|
73
|
+
.IX Title "git-subrepo 1"
|
74
|
+
.TH git-subrepo 1 "August 2017" "Generated by Swim v0.1.41" "Git Submodule Alternative"
|
75
|
+
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
76
|
+
.\" way too many mistakes in technical documents.
|
77
|
+
.if n .ad l
|
78
|
+
.nh
|
79
|
+
.SH "Name"
|
80
|
+
.IX Header "Name"
|
81
|
+
git-subrepo \- Git Submodule Alternative
|
82
|
+
.PP
|
83
|
+
<badge travis ingydotnet/git\-subrepo>
|
84
|
+
.SH "Synopsis"
|
85
|
+
.IX Header "Synopsis"
|
86
|
+
.Vb 1
|
87
|
+
\& git subrepo \-h # Help Overview
|
88
|
+
\&
|
89
|
+
\& git subrepo clone <remote\-url> [<subdir>]
|
90
|
+
\& git subrepo init <subdir>
|
91
|
+
\& git subrepo pull <subdir>
|
92
|
+
\& git subrepo push <subdir>
|
93
|
+
\&
|
94
|
+
\& git subrepo fetch <subdir>
|
95
|
+
\& git subrepo branch <subdir>
|
96
|
+
\& git subrepo commit <subdir>
|
97
|
+
\& git subrepo config <subdir>
|
98
|
+
\&
|
99
|
+
\& git subrepo status [<subdir>]
|
100
|
+
\& git subrepo clean <subdir>
|
101
|
+
\&
|
102
|
+
\& git subrepo help [<command> | \-\-all]
|
103
|
+
\& git subrepo version
|
104
|
+
\& git subrepo upgrade
|
105
|
+
.Ve
|
106
|
+
.SH "Description"
|
107
|
+
.IX Header "Description"
|
108
|
+
This git command \*(L"clones\*(R" an external git repo into a subdirectory of your
|
109
|
+
repo. Later on, upstream changes can be pulled in, and local changes can be
|
110
|
+
pushed back. Simple.
|
111
|
+
.SH "Benefits"
|
112
|
+
.IX Header "Benefits"
|
113
|
+
This command is an improvement from \f(CW\*(C`git\-submodule\*(C'\fR and \f(CW\*(C`git\-subtree\*(C'\fR; two
|
114
|
+
other git commands with similar goals, but various problems.
|
115
|
+
.PP
|
116
|
+
It assumes there are 3 main roles of people interacting with a repo, and
|
117
|
+
attempts to serve them all well:
|
118
|
+
.IP "\(bu" 4
|
119
|
+
\&\fBowner\fR \- The person who authors/owns/maintains a repo.
|
120
|
+
.IP "\(bu" 4
|
121
|
+
\&\fBusers\fR \- People who are just using/installing the repo.
|
122
|
+
.IP "\(bu" 4
|
123
|
+
\&\fBcollaborators\fR \- People who commit code to the repo and subrepos.
|
124
|
+
.PP
|
125
|
+
The \f(CW\*(C`git\-subrepo\*(C'\fR command benefits these roles in the following ways:
|
126
|
+
.IP "\(bu" 4
|
127
|
+
Simple and intuitive commandline usage (with tab completion).
|
128
|
+
.IP "\(bu" 4
|
129
|
+
Users get your repo and all your subrepos just by cloning your repo.
|
130
|
+
.IP "\(bu" 4
|
131
|
+
Users do not need to install \f(CW\*(C`git\-subrepo\*(C'\fR, ever.
|
132
|
+
.IP "\(bu" 4
|
133
|
+
Collaborators do not need to install unless they want to push/pull.
|
134
|
+
.IP "\(bu" 4
|
135
|
+
Collaborators know when a subdir is a subrepo (it has a \f(CW\*(C`.gitrepo\*(C'\fR file).
|
136
|
+
.IP "\(bu" 4
|
137
|
+
The \f(CW\*(C`.gitrepo\*(C'\fR file never gets pushed back to the subrepo upstream.
|
138
|
+
.IP "\(bu" 4
|
139
|
+
Well named branches and remotes are generated for manual operations.
|
140
|
+
.IP "\(bu" 4
|
141
|
+
Owners do not deal with the complications of keeping submodules in sync.
|
142
|
+
.IP "\(bu" 4
|
143
|
+
Subrepo repositories can contain subrepos themselves.
|
144
|
+
.IP "\(bu" 4
|
145
|
+
Branching with subrepos JustWorks™.
|
146
|
+
.IP "\(bu" 4
|
147
|
+
Different branches can have different subrepos in different states, etc.
|
148
|
+
.IP "\(bu" 4
|
149
|
+
Moving/renaming/deleting a subrepo subdir JustWorks™.
|
150
|
+
.IP "\(bu" 4
|
151
|
+
You can \f(CW\*(C`init\*(C'\fR an existing subdirectory into a subrepo.
|
152
|
+
.IP "\(bu" 4
|
153
|
+
Your git history is kept squeaky clean.
|
154
|
+
.IP "\(bu" 4
|
155
|
+
Upstream history (clone/pull) is condensed into a single commit.
|
156
|
+
.IP "\(bu" 4
|
157
|
+
Pulls can use a \f(CW\*(C`merge\*(C'\fR, \f(CW\*(C`rebase\*(C'\fR or \f(CW\*(C`force\*(C'\fR strategies.
|
158
|
+
.IP "\(bu" 4
|
159
|
+
You can see the subrepo history with \f(CW\*(C`git log subrepo/<subdir>/fetch\*(C'\fR.
|
160
|
+
.IP "\(bu" 4
|
161
|
+
Commits pushed back upstream are \fBnot\fR condensed (by default).
|
162
|
+
.IP "\(bu" 4
|
163
|
+
Trivial to try any subrepo operations and then reset back.
|
164
|
+
.IP "\(bu" 4
|
165
|
+
No configuration required.
|
166
|
+
.IP "\(bu" 4
|
167
|
+
Does not introduce history that messes up other git commands.
|
168
|
+
.IP "\(bu" 4
|
169
|
+
Fixes known rebase failures with \f(CW\*(C`git\-subtree\*(C'\fR.
|
170
|
+
.SH "Installation"
|
171
|
+
.IX Header "Installation"
|
172
|
+
The best short answer is:
|
173
|
+
.PP
|
174
|
+
.Vb 2
|
175
|
+
\& git clone https://github.com/ingydotnet/git\-subrepo /path/to/git\-subrepo
|
176
|
+
\& echo \*(Aqsource /path/to/git\-subrepo/.rc\*(Aq >> ~/.bashrc
|
177
|
+
.Ve
|
178
|
+
.PP
|
179
|
+
The complete \*(L"Installation Instructions\*(R" can be found below.
|
180
|
+
.PP
|
181
|
+
Note: git-subrepo needs a git version (> 2.5) that supports worktree:s.
|
182
|
+
.SH "Commands"
|
183
|
+
.IX Header "Commands"
|
184
|
+
All the \fBsubrepo\fR commands use names of actual Git commands and try to do
|
185
|
+
operations that are similar to their Git counterparts. They also attempt to
|
186
|
+
give similar output in an attempt to make the subrepo usage intuitive to
|
187
|
+
experienced Git users.
|
188
|
+
.PP
|
189
|
+
Please note that the commands are \fInot\fR exact equivalents, and do not take
|
190
|
+
all the same arguments. Keep reading…
|
191
|
+
.ie n .IP """git subrepo clone <repository> [<subdir>] [\-b <branch>] [\-f] [\-m <msg>] [\-e] [\-\-method <merge|rebase>]""" 4
|
192
|
+
.el .IP "\f(CWgit subrepo clone <repository> [<subdir>] [\-b <branch>] [\-f] [\-m <msg>] [\-e] [\-\-method <merge|rebase>]\fR" 4
|
193
|
+
.IX Item "git subrepo clone <repository> [<subdir>] [-b <branch>] [-f] [-m <msg>] [-e] [--method <merge|rebase>]"
|
194
|
+
Add a repository as a subrepo in a subdir of your repository.
|
195
|
+
.Sp
|
196
|
+
This is similar in feel to \f(CW\*(C`git clone\*(C'\fR. You just specify the remote repo url,
|
197
|
+
and optionally a sub-directory and/or branch name. The repo will be fetched
|
198
|
+
and merged into the subdir.
|
199
|
+
.Sp
|
200
|
+
The subrepo history is \fIsquashed\fR into a single commit that contains the
|
201
|
+
reference information. This information is also stored in a special file
|
202
|
+
called \f(CW\*(C`<subdir>/.gitrepo\*(C'\fR. The presence of this file indicates that the
|
203
|
+
directory is a subrepo.
|
204
|
+
.Sp
|
205
|
+
All subsequent commands refer to the subrepo by the name of the
|
206
|
+
\&\fIsubdir\fR. From the subdir, all the current information about the subrepo
|
207
|
+
can be obtained.
|
208
|
+
.Sp
|
209
|
+
The \f(CW\*(C`\-\-force\*(C'\fR option will \*(L"reclone\*(R" (completely replace) an existing subdir.
|
210
|
+
.Sp
|
211
|
+
The \f(CW\*(C`\-\-method\*(C'\fR option will decide how the join process between branches are
|
212
|
+
performed. The default option is merge.
|
213
|
+
.Sp
|
214
|
+
The \f(CW\*(C`clone\*(C'\fR command accepts the \f(CW\*(C`\-\-branch=\*(C'\fR \f(CW\*(C`\-\-edit\*(C'\fR, \f(CW\*(C`\-\-force\*(C'\fR and \f(CW\*(C`\-\-
|
215
|
+
message=\*(C'\fR options.
|
216
|
+
.ie n .IP """git subrepo init <subdir> [\-r <remote>] [\-b <branch>] [\-\-method <merge|rebase>]""" 4
|
217
|
+
.el .IP "\f(CWgit subrepo init <subdir> [\-r <remote>] [\-b <branch>] [\-\-method <merge|rebase>]\fR" 4
|
218
|
+
.IX Item "git subrepo init <subdir> [-r <remote>] [-b <branch>] [--method <merge|rebase>]"
|
219
|
+
Turn an existing subdirectory into a subrepo.
|
220
|
+
.Sp
|
221
|
+
If you want to expose a subdirectory of your project as a published subrepo,
|
222
|
+
this command will do that. It will split out the content of a normal
|
223
|
+
subdirectory into a branch and start tracking it as a subrepo. Afterwards your
|
224
|
+
original repo will look exactly the same except that there will be a \f(CW\*(C`<subdir>/.gitrepo\*(C'\fR file.
|
225
|
+
.Sp
|
226
|
+
If you specify the \f(CW\*(C`\-\-remote\*(C'\fR (and optionally the \f(CW\*(C`\-\-branch\*(C'\fR) option, the
|
227
|
+
values will be added to the \f(CW\*(C`<subdir>/.gitrepo\*(C'\fR file. The \f(CW\*(C`\-\-remote\*(C'\fR
|
228
|
+
option is the upstream \s-1URL,\s0 and the \f(CW\*(C`\-\-branch\*(C'\fR option is the upstream branch
|
229
|
+
to push to. These values will be needed to do a \f(CW\*(C`git subrepo push\*(C'\fR command,
|
230
|
+
but they can be provided later on the \f(CW\*(C`push\*(C'\fR command (and saved to \f(CW\*(C`<subdir>/.gitrepo\*(C'\fR if you also specify the \f(CW\*(C`\-\-update\*(C'\fR option).
|
231
|
+
.Sp
|
232
|
+
Note: You will need to create the empty upstream repo and push to it on your
|
233
|
+
own, using \f(CW\*(C`git subrepo push <subdir>\*(C'\fR.
|
234
|
+
.Sp
|
235
|
+
The \f(CW\*(C`\-\-method\*(C'\fR option will decide how the join process between branches are
|
236
|
+
performed. The default option is merge.
|
237
|
+
.Sp
|
238
|
+
The \f(CW\*(C`init\*(C'\fR command accepts the \f(CW\*(C`\-\-branch=\*(C'\fR and \f(CW\*(C`\-\-remote=\*(C'\fR options.
|
239
|
+
.ie n .IP """git subrepo pull <subdir>|\-\-all [\-M|\-R|\-f] [\-m <msg>] [\-e] [\-b <branch>] [\-r <remote>] [\-u]""" 4
|
240
|
+
.el .IP "\f(CWgit subrepo pull <subdir>|\-\-all [\-M|\-R|\-f] [\-m <msg>] [\-e] [\-b <branch>] [\-r <remote>] [\-u]\fR" 4
|
241
|
+
.IX Item "git subrepo pull <subdir>|--all [-M|-R|-f] [-m <msg>] [-e] [-b <branch>] [-r <remote>] [-u]"
|
242
|
+
Update the subrepo subdir with the latest upstream changes.
|
243
|
+
.Sp
|
244
|
+
The \f(CW\*(C`pull\*(C'\fR command fetches the latest content from the remote branch pointed
|
245
|
+
to by the subrepo's \f(CW\*(C`.gitrepo\*(C'\fR file, and then tries to merge the changes into
|
246
|
+
the corresponding subdir. It does this by making a branch of the local commits
|
247
|
+
to the subdir and then merging or rebasing (see below) it with the fetched
|
248
|
+
upstream content. After the merge, the content of the new branch replaces your
|
249
|
+
subdir, the \f(CW\*(C`.gitrepo\*(C'\fR file is updated and a single 'pull' commit is added to
|
250
|
+
your mainline history.
|
251
|
+
.Sp
|
252
|
+
The \f(CW\*(C`pull\*(C'\fR command will attempt to do the following commands in one go:
|
253
|
+
.Sp
|
254
|
+
.Vb 6
|
255
|
+
\& git subrepo fetch <subdir>
|
256
|
+
\& git subrepo branch <subdir>
|
257
|
+
\& git merge/rebase subrepo/<subdir>/fetch subrepo/<subdir>
|
258
|
+
\& git subrepo commit <subdir>
|
259
|
+
\& # Only needed for a consequential push:
|
260
|
+
\& git update\-ref refs/subrepo/<subdir>/pull subrepo/<subdir>
|
261
|
+
.Ve
|
262
|
+
.Sp
|
263
|
+
In other words, you could do all the above commands yourself, for the same
|
264
|
+
effect. If any of the commands fail, subrepo will stop and tell you to finish
|
265
|
+
this by hand. Generally a failure would be in the merge or rebase part, where
|
266
|
+
conflicts can happen. Since Git has lots of ways to resolve conflicts to your
|
267
|
+
personal tastes, the subrepo command defers to letting you do this by hand.
|
268
|
+
.Sp
|
269
|
+
When pulling new data, the method selected in clone/init is used. This has no
|
270
|
+
effect on the final result of the pull, since it becomes a single commit. But
|
271
|
+
it does affect the resulting \f(CW\*(C`subrepo/<subdir>\*(C'\fR branch, which is often
|
272
|
+
used for a subrepo \f(CW\*(C`push\*(C'\fR command. See 'push' below for more information. If
|
273
|
+
you want to change the method you can use the \f(CW\*(C`config\*(C'\fR command for this.
|
274
|
+
.Sp
|
275
|
+
When you pull you can assume a fast-forward strategy (default) or you can
|
276
|
+
specify a \f(CW\*(C`\-\-rebase\*(C'\fR, \f(CW\*(C`\-\-merge\*(C'\fR or \f(CW\*(C`\-\-force\*(C'\fR strategy. The latter is the
|
277
|
+
same as a \f(CW\*(C`clone \-\-force\*(C'\fR operation, using the current remote and branch.
|
278
|
+
.Sp
|
279
|
+
When you pull you can assume a fast-forward strategy (default) or you can
|
280
|
+
specify a \f(CW\*(C`\-\-rebase\*(C'\fR, \f(CW\*(C`\-\-merge\*(C'\fR or \f(CW\*(C`\-\-force\*(C'\fR strategy. The latter is the
|
281
|
+
same as a \f(CW\*(C`clone \-\-force\*(C'\fR operation, using the current remote and branch.
|
282
|
+
.Sp
|
283
|
+
Like the \f(CW\*(C`clone\*(C'\fR command, \f(CW\*(C`pull\*(C'\fR will squash all the changes (since the last
|
284
|
+
pull or clone) into one commit. This keeps your mainline history nice and
|
285
|
+
clean. You can easily see the subrepo's history with the \f(CW\*(C`git log\*(C'\fR command:
|
286
|
+
.Sp
|
287
|
+
.Vb 1
|
288
|
+
\& git log refs/subrepo/<subdir>/fetch
|
289
|
+
.Ve
|
290
|
+
.Sp
|
291
|
+
The set of commands used above are described in detail below.
|
292
|
+
.Sp
|
293
|
+
The \f(CW\*(C`pull\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, \f(CW\*(C`\-\-branch=\*(C'\fR, \f(CW\*(C`\-\-edit\*(C'\fR, \f(CW\*(C`\-\-force\*(C'\fR,
|
294
|
+
\&\f(CW\*(C`\-\-message=\*(C'\fR, \f(CW\*(C`\-\-remote=\*(C'\fR and \f(CW\*(C`\-\-update\*(C'\fR options.
|
295
|
+
.ie n .IP """git subrepo push <subdir>|\-\-all [<branch>] [\-r <remote>] [\-b <branch>] [\-M|\-R] [\-u] [\-f] [\-s] [\-N]""" 4
|
296
|
+
.el .IP "\f(CWgit subrepo push <subdir>|\-\-all [<branch>] [\-r <remote>] [\-b <branch>] [\-M|\-R] [\-u] [\-f] [\-s] [\-N]\fR" 4
|
297
|
+
.IX Item "git subrepo push <subdir>|--all [<branch>] [-r <remote>] [-b <branch>] [-M|-R] [-u] [-f] [-s] [-N]"
|
298
|
+
Push a properly merged subrepo branch back upstream.
|
299
|
+
.Sp
|
300
|
+
This command takes the subrepo branch from a successful pull command and
|
301
|
+
pushes the history back to its designated remote and branch. You can also use
|
302
|
+
the \f(CW\*(C`branch\*(C'\fR command and merge things yourself before pushing if you want to
|
303
|
+
(although that is probably a rare use case).
|
304
|
+
.Sp
|
305
|
+
The \f(CW\*(C`push\*(C'\fR command requires a branch that has been properly merged/rebased
|
306
|
+
with the upstream \s-1HEAD \s0(unless the upstream \s-1HEAD\s0 is empty, which is common
|
307
|
+
when doing a first \f(CW\*(C`push\*(C'\fR after an \f(CW\*(C`init\*(C'\fR). That means the upstream \s-1HEAD\s0 is
|
308
|
+
one of the commits in the branch.
|
309
|
+
.Sp
|
310
|
+
By default the branch ref \f(CW\*(C`refs/subrepo/<subdir>/pull\*(C'\fR will be pushed,
|
311
|
+
but you can specify a (properly merged) branch to push.
|
312
|
+
.Sp
|
313
|
+
After that, the \f(CW\*(C`push\*(C'\fR command just checks that the branch contains the
|
314
|
+
upstream \s-1HEAD\s0 and then pushes it upstream.
|
315
|
+
.Sp
|
316
|
+
The \f(CW\*(C`\-\-force\*(C'\fR option will do a force push. Force pushes are typically
|
317
|
+
discouraged. Only use this option if you fully understand it. (The \f(CW\*(C`\-\-force\*(C'\fR
|
318
|
+
option will \s-1NOT\s0 check for a proper merge. \s-1ANY\s0 branch will be force pushed!)
|
319
|
+
.Sp
|
320
|
+
The \f(CW\*(C`push\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, \f(CW\*(C`\-\-branch=\*(C'\fR, \f(CW\*(C`\-\-dry\-run\*(C'\fR, \f(CW\*(C`\-\-
|
321
|
+
force\*(C'\fR, \f(CW\*(C`\-\-merge\*(C'\fR, \f(CW\*(C`\-\-rebase\*(C'\fR, \f(CW\*(C`\-\-remote=\*(C'\fR, \f(CW\*(C`\-\-squash\*(C'\fR and \f(CW\*(C`\-\-
|
322
|
+
update\*(C'\fR options.
|
323
|
+
.ie n .IP """git subrepo fetch <subdir>|\-\-all [\-r <remote>] [\-b <branch>]""" 4
|
324
|
+
.el .IP "\f(CWgit subrepo fetch <subdir>|\-\-all [\-r <remote>] [\-b <branch>]\fR" 4
|
325
|
+
.IX Item "git subrepo fetch <subdir>|--all [-r <remote>] [-b <branch>]"
|
326
|
+
Fetch the remote/upstream content for a subrepo.
|
327
|
+
.Sp
|
328
|
+
It will create a Git reference called \f(CW\*(C`subrepo/<subdir>/fetch\*(C'\fR that
|
329
|
+
points at the same commit as \f(CW\*(C`FETCH_HEAD\*(C'\fR. It will also create a remote
|
330
|
+
called \f(CW\*(C`subrepo/<subdir>\*(C'\fR. These are temporary and you can easily remove
|
331
|
+
them with the subrepo \f(CW\*(C`clean\*(C'\fR command.
|
332
|
+
.Sp
|
333
|
+
The \f(CW\*(C`fetch\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, \f(CW\*(C`\-\-branch=\*(C'\fR and \f(CW\*(C`\-\-
|
334
|
+
remote=\*(C'\fR options.
|
335
|
+
.ie n .IP """git subrepo branch <subdir>|\-\-all [\-f] [\-F]""" 4
|
336
|
+
.el .IP "\f(CWgit subrepo branch <subdir>|\-\-all [\-f] [\-F]\fR" 4
|
337
|
+
.IX Item "git subrepo branch <subdir>|--all [-f] [-F]"
|
338
|
+
Create a branch with local subrepo commits.
|
339
|
+
.Sp
|
340
|
+
Scan the history of the mainline for all the commits that affect the \f(CW\*(C`subdir\*(C'\fR
|
341
|
+
and create a new branch from them called \f(CW\*(C`subrepo/<subdir>\*(C'\fR.
|
342
|
+
.Sp
|
343
|
+
This is useful for doing \f(CW\*(C`pull\*(C'\fR and \f(CW\*(C`push\*(C'\fR commands by hand.
|
344
|
+
.Sp
|
345
|
+
Use the \f(CW\*(C`\-\-force\*(C'\fR option to write over an existing \f(CW\*(C`subrepo/<subdir>\*(C'\fR branch.
|
346
|
+
.Sp
|
347
|
+
The \f(CW\*(C`branch\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, \f(CW\*(C`\-\-fetch\*(C'\fR and \f(CW\*(C`\-\-force\*(C'\fR options.
|
348
|
+
.ie n .IP """git subrepo commit <subdir> [<subrepo\-ref>] [\-m <msg>] [\-e] [\-f] [\-F]""" 4
|
349
|
+
.el .IP "\f(CWgit subrepo commit <subdir> [<subrepo\-ref>] [\-m <msg>] [\-e] [\-f] [\-F]\fR" 4
|
350
|
+
.IX Item "git subrepo commit <subdir> [<subrepo-ref>] [-m <msg>] [-e] [-f] [-F]"
|
351
|
+
Add subrepo branch to current history as a single commit.
|
352
|
+
.Sp
|
353
|
+
This command is generally used after a hand-merge. You have done a \f(CW\*(C`subrepo
|
354
|
+
branch\*(C'\fR and merged (rebased) it with the upstream. This command takes the \s-1HEAD\s0
|
355
|
+
of that branch, puts its content into the subrepo subdir and adds a new commit
|
356
|
+
for it to the top of your mainline history.
|
357
|
+
.Sp
|
358
|
+
This command requires that the upstream \s-1HEAD\s0 be in the \f(CW\*(C`subrepo/<subdir>\*(C'\fR
|
359
|
+
branch history. That way the same branch can push upstream. Use the \f(CW\*(C`\-\-force\*(C'\fR
|
360
|
+
option to commit anyway.
|
361
|
+
.Sp
|
362
|
+
The \f(CW\*(C`commit\*(C'\fR command accepts the \f(CW\*(C`\-\-edit\*(C'\fR, \f(CW\*(C`\-\-fetch\*(C'\fR, \f(CW\*(C`\-\-force\*(C'\fR and \f(CW\*(C`\-\-
|
363
|
+
message=\*(C'\fR options.
|
364
|
+
.ie n .IP """git subrepo status [<subdir>|\-\-all|\-\-ALL] [\-F] [\-q|\-v]""" 4
|
365
|
+
.el .IP "\f(CWgit subrepo status [<subdir>|\-\-all|\-\-ALL] [\-F] [\-q|\-v]\fR" 4
|
366
|
+
.IX Item "git subrepo status [<subdir>|--all|--ALL] [-F] [-q|-v]"
|
367
|
+
Get the status of a subrepo. Uses the \f(CW\*(C`\-\-all\*(C'\fR option by default. If the \f(CW\*(C`\-\-
|
368
|
+
quiet\*(C'\fR flag is used, just print the subrepo names, one per line.
|
369
|
+
.Sp
|
370
|
+
The \f(CW\*(C`\-\-verbose\*(C'\fR option will show all the recent local and upstream commits.
|
371
|
+
.Sp
|
372
|
+
Use \f(CW\*(C`\-\-ALL\*(C'\fR to show the subrepos of the subrepos (ie the
|
373
|
+
\&\*(L"subsubrepos\*(R"), if any.
|
374
|
+
.Sp
|
375
|
+
The \f(CW\*(C`status\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, \f(CW\*(C`\-\-ALL\*(C'\fR, \f(CW\*(C`\-\-fetch\*(C'\fR, \f(CW\*(C`\-\-quiet\*(C'\fR
|
376
|
+
and \f(CW\*(C`\-\-verbose\*(C'\fR options.
|
377
|
+
.ie n .IP """git subrepo clean <subdir>|\-\-all|\-\-ALL [\-f]""" 4
|
378
|
+
.el .IP "\f(CWgit subrepo clean <subdir>|\-\-all|\-\-ALL [\-f]\fR" 4
|
379
|
+
.IX Item "git subrepo clean <subdir>|--all|--ALL [-f]"
|
380
|
+
Remove artifacts created by \f(CW\*(C`fetch\*(C'\fR and \f(CW\*(C`branch\*(C'\fR commands.
|
381
|
+
.Sp
|
382
|
+
The \f(CW\*(C`fetch\*(C'\fR and \f(CW\*(C`branch\*(C'\fR operations (and other commands that call them)
|
383
|
+
create temporary things like refs, branches and remotes. This command removes
|
384
|
+
all those things.
|
385
|
+
.Sp
|
386
|
+
Use \f(CW\*(C`\-\-force\*(C'\fR to remove refs. Refs are not removed by default because they
|
387
|
+
are sometimes needed between commands.
|
388
|
+
.Sp
|
389
|
+
Use \f(CW\*(C`\-\-all\*(C'\fR to clean up after all the current subrepos. Sometimes you might
|
390
|
+
change to a branch where a subrepo doesn't exist, and then \f(CW\*(C`\-\-all\*(C'\fR won't find
|
391
|
+
it. Use \f(CW\*(C`\-\-ALL\*(C'\fR to remove any artifacts that were ever created by subrepo.
|
392
|
+
.Sp
|
393
|
+
To remove \s-1ALL\s0 subrepo artifacts:
|
394
|
+
.Sp
|
395
|
+
.Vb 1
|
396
|
+
\& git subrepo clean \-\-ALL \-\-force
|
397
|
+
.Ve
|
398
|
+
.Sp
|
399
|
+
The \f(CW\*(C`clean\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, \f(CW\*(C`\-\-ALL\*(C'\fR, and \f(CW\*(C`\-\-force\*(C'\fR options.
|
400
|
+
.ie n .IP """git subrepo config <subdir> <option> [<value>] [\-f]""" 4
|
401
|
+
.el .IP "\f(CWgit subrepo config <subdir> <option> [<value>] [\-f]\fR" 4
|
402
|
+
.IX Item "git subrepo config <subdir> <option> [<value>] [-f]"
|
403
|
+
Read or update configuration values in the subdir/.gitrepo file.
|
404
|
+
.Sp
|
405
|
+
Because most of the values stored in the .gitrepo file are generated you
|
406
|
+
will need to use \f(CW\*(C`\-\-force\*(C'\fR if you want to change anything else then the
|
407
|
+
\&\f(CW\*(C`method\*(C'\fR option.
|
408
|
+
.Sp
|
409
|
+
Example to update the \f(CW\*(C`method\*(C'\fR option for a subrepo:
|
410
|
+
.Sp
|
411
|
+
.Vb 1
|
412
|
+
\& git subrepo config foo method rebase
|
413
|
+
.Ve
|
414
|
+
.ie n .IP """git subrepo help [<command>|\-\-all]""" 4
|
415
|
+
.el .IP "\f(CWgit subrepo help [<command>|\-\-all]\fR" 4
|
416
|
+
.IX Item "git subrepo help [<command>|--all]"
|
417
|
+
Same as \f(CW\*(C`git help subrepo\*(C'\fR. Will launch the manpage. For the shorter usage,
|
418
|
+
use \f(CW\*(C`git subrepo \-h\*(C'\fR.
|
419
|
+
.Sp
|
420
|
+
Use \f(CW\*(C`git subrepo help <command> to get help for a specific command. Use\*(C'\fR\-\-
|
421
|
+
all` to get a summary of all commands.
|
422
|
+
.Sp
|
423
|
+
The \f(CW\*(C`help\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR option.
|
424
|
+
.ie n .IP """git subrepo version [\-q|\-v]""" 4
|
425
|
+
.el .IP "\f(CWgit subrepo version [\-q|\-v]\fR" 4
|
426
|
+
.IX Item "git subrepo version [-q|-v]"
|
427
|
+
This command will display version information about git-subrepo and its
|
428
|
+
environment. For just the version number, use \f(CW\*(C`git subrepo \-\-version\*(C'\fR. Use
|
429
|
+
\&\f(CW\*(C`\-\-verbose\*(C'\fR for more version info, and \f(CW\*(C`\-\-quiet\*(C'\fR for less.
|
430
|
+
.Sp
|
431
|
+
The \f(CW\*(C`version\*(C'\fR command accepts the \f(CW\*(C`\-\-quiet\*(C'\fR and \f(CW\*(C`\-\-verbose\*(C'\fR options.
|
432
|
+
.ie n .IP """git subrepo upgrade""" 4
|
433
|
+
.el .IP "\f(CWgit subrepo upgrade\fR" 4
|
434
|
+
.IX Item "git subrepo upgrade"
|
435
|
+
Upgrade the \f(CW\*(C`git\-subrepo\*(C'\fR software itself. This simply does a \f(CW\*(C`git pull\*(C'\fR
|
436
|
+
on the git repository that the code is running from. It only works if you
|
437
|
+
are on the \f(CW\*(C`master\*(C'\fR branch. It won't work if you installed \f(CW\*(C`git\-subrepo\*(C'\fR
|
438
|
+
using \f(CW\*(C`make install\*(C'\fR; in that case you'll need to \f(CW\*(C`make install\*(C'\fR from the
|
439
|
+
latest code.
|
440
|
+
.SH "Command Options"
|
441
|
+
.IX Header "Command Options"
|
442
|
+
.ie n .IP """\-h""" 4
|
443
|
+
.el .IP "\f(CW\-h\fR" 4
|
444
|
+
.IX Item "-h"
|
445
|
+
Show a brief view of the commands and options.
|
446
|
+
.ie n .IP """\-\-help""" 4
|
447
|
+
.el .IP "\f(CW\-\-help\fR" 4
|
448
|
+
.IX Item "--help"
|
449
|
+
Gives an overview of the help options available for the subrepo command.
|
450
|
+
.ie n .IP """\-\-version""" 4
|
451
|
+
.el .IP "\f(CW\-\-version\fR" 4
|
452
|
+
.IX Item "--version"
|
453
|
+
Print the git-subrepo version. Just the version number. Try the \f(CW\*(C`version\*(C'\fR
|
454
|
+
command for more version info.
|
455
|
+
.ie n .IP """\-\-all"" (""\-a"")" 4
|
456
|
+
.el .IP "\f(CW\-\-all\fR (\f(CW\-a\fR)" 4
|
457
|
+
.IX Item "--all (-a)"
|
458
|
+
If you have multiple subrepos, issue the command to all of them (if
|
459
|
+
applicable).
|
460
|
+
.ie n .IP """\-\-ALL"" (""\-A"")" 4
|
461
|
+
.el .IP "\f(CW\-\-ALL\fR (\f(CW\-A\fR)" 4
|
462
|
+
.IX Item "--ALL (-A)"
|
463
|
+
If you have subrepos that also have subrepos themselves, issue the command to
|
464
|
+
\&\s-1ALL\s0 of them. Note that the \f(CW\*(C`\-\-ALL\*(C'\fR option only works for a subset of the
|
465
|
+
commands that \f(CW\*(C`\-\-all\*(C'\fR works for.
|
466
|
+
.ie n .IP """\-\-branch=<branch\-name>"" (""\-b <branch\-name>"")" 4
|
467
|
+
.el .IP "\f(CW\-\-branch=<branch\-name>\fR (\f(CW\-b <branch\-name>\fR)" 4
|
468
|
+
.IX Item "--branch=<branch-name> (-b <branch-name>)"
|
469
|
+
Use a different upstream branch-name than the remote \s-1HEAD\s0 or the one saved in
|
470
|
+
\&\f(CW\*(C`.gitrepo\*(C'\fR locally.
|
471
|
+
.ie n .IP """\-\-dry\-run"" (""\-N"")" 4
|
472
|
+
.el .IP "\f(CW\-\-dry\-run\fR (\f(CW\-N\fR)" 4
|
473
|
+
.IX Item "--dry-run (-N)"
|
474
|
+
For the push command, do everything up until the push and then print out the
|
475
|
+
actual \f(CW\*(C`git push\*(C'\fR command needed to finish the operation.
|
476
|
+
.ie n .IP """\-\-edit"" (""\-e"")" 4
|
477
|
+
.el .IP "\f(CW\-\-edit\fR (\f(CW\-e\fR)" 4
|
478
|
+
.IX Item "--edit (-e)"
|
479
|
+
Edit the commit message before committing.
|
480
|
+
.ie n .IP """\-\-fetch"" (""\-F"")" 4
|
481
|
+
.el .IP "\f(CW\-\-fetch\fR (\f(CW\-F\fR)" 4
|
482
|
+
.IX Item "--fetch (-F)"
|
483
|
+
Use this option to fetch the upstream commits, before running the command.
|
484
|
+
.ie n .IP """\-\-force"" (""\-f"")" 4
|
485
|
+
.el .IP "\f(CW\-\-force\fR (\f(CW\-f\fR)" 4
|
486
|
+
.IX Item "--force (-f)"
|
487
|
+
Use this option to force certain commands that fail in the general case.
|
488
|
+
.Sp
|
489
|
+
\&\s-1NOTE:\s0 The \f(CW\*(C`\-\-force\*(C'\fR option means different things for different commands.
|
490
|
+
Read the command specific doc for the exact meaning.
|
491
|
+
.ie n .IP """\-\-merge"" (""\-M"")" 4
|
492
|
+
.el .IP "\f(CW\-\-merge\fR (\f(CW\-M\fR)" 4
|
493
|
+
.IX Item "--merge (-M)"
|
494
|
+
Use a \f(CW\*(C`merge\*(C'\fR strategy to include upstream subrepo commits on a pull (or
|
495
|
+
setup for push).
|
496
|
+
.ie n .IP """\-\-message=<message>"" (""\-m <message>"")" 4
|
497
|
+
.el .IP "\f(CW\-\-message=<message>\fR (\f(CW\-m <message>\fR)" 4
|
498
|
+
.IX Item "--message=<message> (-m <message>)"
|
499
|
+
Specify your own commit message on the command line.
|
500
|
+
.ie n .IP """\-\-rebase"" (""\-R"")" 4
|
501
|
+
.el .IP "\f(CW\-\-rebase\fR (\f(CW\-R\fR)" 4
|
502
|
+
.IX Item "--rebase (-R)"
|
503
|
+
Use a \f(CW\*(C`rebase\*(C'\fR strategy to include upstream subrepo commits on a pull (or
|
504
|
+
setup for push).
|
505
|
+
.ie n .IP """\-\-remote=<remote\-url>"" (""\-r <remote\-url>"")" 4
|
506
|
+
.el .IP "\f(CW\-\-remote=<remote\-url>\fR (\f(CW\-r <remote\-url>\fR)" 4
|
507
|
+
.IX Item "--remote=<remote-url> (-r <remote-url>)"
|
508
|
+
Use a different remote-url than the one saved in \f(CW\*(C`.gitrepo\*(C'\fR locally.
|
509
|
+
.ie n .IP """\-\-squash"" (""\-s"")" 4
|
510
|
+
.el .IP "\f(CW\-\-squash\fR (\f(CW\-s\fR)" 4
|
511
|
+
.IX Item "--squash (-s)"
|
512
|
+
Squash all commits on a push into one new commit.
|
513
|
+
.ie n .IP """\-\-update"" (""\-u"")" 4
|
514
|
+
.el .IP "\f(CW\-\-update\fR (\f(CW\-u\fR)" 4
|
515
|
+
.IX Item "--update (-u)"
|
516
|
+
If \f(CW\*(C`\-\-branch\*(C'\fR or \f(CW\*(C`\-\-remote\*(C'\fR are used, and the command updates the
|
517
|
+
\&\f(CW\*(C`.gitrepo\*(C'\fR file, include these values to the update.
|
518
|
+
.SH "Output Options"
|
519
|
+
.IX Header "Output Options"
|
520
|
+
.ie n .IP """\-\-quiet"" (""\-q"")" 4
|
521
|
+
.el .IP "\f(CW\-\-quiet\fR (\f(CW\-q\fR)" 4
|
522
|
+
.IX Item "--quiet (-q)"
|
523
|
+
Print as little info as possible. Applicable to most commands.
|
524
|
+
.ie n .IP """\-\-verbose"" (""\-v"")" 4
|
525
|
+
.el .IP "\f(CW\-\-verbose\fR (\f(CW\-v\fR)" 4
|
526
|
+
.IX Item "--verbose (-v)"
|
527
|
+
Print more information about the command execution and results. Applicable to
|
528
|
+
most commands.
|
529
|
+
.ie n .IP """\-\-debug"" (""\-d"")" 4
|
530
|
+
.el .IP "\f(CW\-\-debug\fR (\f(CW\-d\fR)" 4
|
531
|
+
.IX Item "--debug (-d)"
|
532
|
+
Show the actual git (and other) commands being executed under the hood.
|
533
|
+
Applicable to most commands.
|
534
|
+
.ie n .IP """\-\-DEBUG"" (""\-x"")" 4
|
535
|
+
.el .IP "\f(CW\-\-DEBUG\fR (\f(CW\-x\fR)" 4
|
536
|
+
.IX Item "--DEBUG (-x)"
|
537
|
+
Use the Bash \f(CW\*(C`set \-x\*(C'\fR option which prints every command before it is
|
538
|
+
run. \s-1VERY\s0 noisy, but extremely useful in deep debugging. Applicable to
|
539
|
+
all commands.
|
540
|
+
.SH "Environment Variables"
|
541
|
+
.IX Header "Environment Variables"
|
542
|
+
The \f(CW\*(C`git\-subrepo\*(C'\fR command exports and honors some environment variables:
|
543
|
+
.ie n .IP """GIT_SUBREPO_ROOT""" 4
|
544
|
+
.el .IP "\f(CWGIT_SUBREPO_ROOT\fR" 4
|
545
|
+
.IX Item "GIT_SUBREPO_ROOT"
|
546
|
+
This is set by the \f(CW\*(C`.rc\*(C'\fR file, if you use that method to install / enable \f(CW\*(C`git\-
|
547
|
+
subrepo\*(C'\fR. It contains the path of the \f(CW\*(C`git\-subrepo\*(C'\fR repository.
|
548
|
+
.ie n .IP """GIT_SUBREPO_RUNNING""" 4
|
549
|
+
.el .IP "\f(CWGIT_SUBREPO_RUNNING\fR" 4
|
550
|
+
.IX Item "GIT_SUBREPO_RUNNING"
|
551
|
+
This variable is exported when \f(CW\*(C`git\-subrepo\*(C'\fR is running. It is set to the pid
|
552
|
+
of the \f(CW\*(C`git\-subrepo\*(C'\fR process that is running. Other processes, like git hooks
|
553
|
+
for instance, can use this information to adjust accordingly.
|
554
|
+
.ie n .IP """GIT_SUBREPO_COMMAND""" 4
|
555
|
+
.el .IP "\f(CWGIT_SUBREPO_COMMAND\fR" 4
|
556
|
+
.IX Item "GIT_SUBREPO_COMMAND"
|
557
|
+
This variable is exported when \f(CW\*(C`git\-subrepo\*(C'\fR is running. It is set to the
|
558
|
+
name of the \f(CW\*(C`git\-subrepo\*(C'\fR subcommand that is running.
|
559
|
+
.ie n .IP """GIT_SUBREPO_PAGER""" 4
|
560
|
+
.el .IP "\f(CWGIT_SUBREPO_PAGER\fR" 4
|
561
|
+
.IX Item "GIT_SUBREPO_PAGER"
|
562
|
+
Use this to specify the pager to use for long output commands. Defaults to
|
563
|
+
\&\f(CW$PAGER\fR or \f(CW\*(C`less\*(C'\fR.
|
564
|
+
.ie n .IP """GIT_SUBREPO_QUIET""" 4
|
565
|
+
.el .IP "\f(CWGIT_SUBREPO_QUIET\fR" 4
|
566
|
+
.IX Item "GIT_SUBREPO_QUIET"
|
567
|
+
Set this for quiet (\f(CW\*(C`\-q\*(C'\fR) output.
|
568
|
+
.ie n .IP """GIT_SUBREPO_VERBOSE""" 4
|
569
|
+
.el .IP "\f(CWGIT_SUBREPO_VERBOSE\fR" 4
|
570
|
+
.IX Item "GIT_SUBREPO_VERBOSE"
|
571
|
+
Set this for verbose (\f(CW\*(C`\-v\*(C'\fR) output.
|
572
|
+
.ie n .IP """GIT_SUBREPO_DEBUG""" 4
|
573
|
+
.el .IP "\f(CWGIT_SUBREPO_DEBUG\fR" 4
|
574
|
+
.IX Item "GIT_SUBREPO_DEBUG"
|
575
|
+
Set this for debugging (\f(CW\*(C`\-d\*(C'\fR) output.
|
576
|
+
.SH "Installation Instructions"
|
577
|
+
.IX Header "Installation Instructions"
|
578
|
+
There are currently 3 ways to install \f(CW\*(C`git\-subrepo\*(C'\fR. For all of them you need
|
579
|
+
to get the source code from GitHub:
|
580
|
+
.PP
|
581
|
+
.Vb 1
|
582
|
+
\& git clone https://github.com/ingydotnet/git\-subrepo /path/to/git\-subrepo
|
583
|
+
.Ve
|
584
|
+
.PP
|
585
|
+
The first installation method is preferred: \f(CW\*(C`source\*(C'\fR the \f(CW\*(C`.rc\*(C'\fR file. Just
|
586
|
+
add a line like this one to your shell startup script:
|
587
|
+
.PP
|
588
|
+
.Vb 1
|
589
|
+
\& source /path/to/git\-subrepo/.rc
|
590
|
+
.Ve
|
591
|
+
.PP
|
592
|
+
That will modify your \f(CW\*(C`PATH\*(C'\fR and \f(CW\*(C`MANPATH\*(C'\fR, and also enable command
|
593
|
+
completion.
|
594
|
+
.PP
|
595
|
+
The second method is to do these things by hand. This might afford you more
|
596
|
+
control of your shell environment. Simply add the \f(CW\*(C`lib\*(C'\fR and \f(CW\*(C`man\*(C'\fR
|
597
|
+
directories to your \f(CW\*(C`PATH\*(C'\fR and \f(CW\*(C`MANPATH\*(C'\fR:
|
598
|
+
.PP
|
599
|
+
.Vb 3
|
600
|
+
\& export GIT_SUBREPO_ROOT="/path/to/git\-subrepo"
|
601
|
+
\& export PATH="/path/to/git\-subrepo/lib:$PATH"
|
602
|
+
\& export MANPATH="/path/to/git\-subrepo/man:$MANPATH"
|
603
|
+
.Ve
|
604
|
+
.PP
|
605
|
+
See below for info on how to turn on Command Completion.
|
606
|
+
.PP
|
607
|
+
The third method is a standard system install, which puts \f(CW\*(C`git\-subrepo\*(C'\fR next
|
608
|
+
to your other git commands:
|
609
|
+
.PP
|
610
|
+
.Vb 1
|
611
|
+
\& make install # Possibly with \*(Aqsudo\*(Aq
|
612
|
+
.Ve
|
613
|
+
.PP
|
614
|
+
This method does not account for upgrading and command completion yet.
|
615
|
+
.SS "Windows"
|
616
|
+
.IX Subsection "Windows"
|
617
|
+
This command is known to work in these Windows environments:
|
618
|
+
.IP "\(bu" 4
|
619
|
+
Git for Windows \*(-- <https://git\-for\-windows.github.io/>
|
620
|
+
.IP "\(bu" 4
|
621
|
+
Babun \*(-- <http://babun.github.io/>
|
622
|
+
.IP "\(bu" 4
|
623
|
+
Cygwin \*(-- <https://www.cygwin.com/>
|
624
|
+
.PP
|
625
|
+
Let us know if there are others that it works (or doesn't work) in.
|
626
|
+
.SH "Testing"
|
627
|
+
.IX Header "Testing"
|
628
|
+
The \f(CW\*(C`git\-subrepo\*(C'\fR repository comes with a extensive test suite. You can
|
629
|
+
run it with:
|
630
|
+
.PP
|
631
|
+
.Vb 1
|
632
|
+
\& make test
|
633
|
+
.Ve
|
634
|
+
.PP
|
635
|
+
or if you don't have \f(CW\*(C`make\*(C'\fR on your system:
|
636
|
+
.PP
|
637
|
+
.Vb 1
|
638
|
+
\& prove \-v test
|
639
|
+
.Ve
|
640
|
+
.SH "Upgrading"
|
641
|
+
.IX Header "Upgrading"
|
642
|
+
If you used the \f(CW\*(C`.rc\*(C'\fR or \f(CW\*(C`PATH\*(C'\fR method of installation, just run this to
|
643
|
+
upgrade \f(CW\*(C`git\-subrepo\*(C'\fR:
|
644
|
+
.PP
|
645
|
+
.Vb 1
|
646
|
+
\& git subrepo upgrade
|
647
|
+
.Ve
|
648
|
+
.PP
|
649
|
+
Or (same thing):
|
650
|
+
.PP
|
651
|
+
.Vb 2
|
652
|
+
\& cd /path/to/git\-subrepo
|
653
|
+
\& git pull
|
654
|
+
.Ve
|
655
|
+
.PP
|
656
|
+
If you used \f(CW\*(C`make install\*(C'\fR method, then run this again (after \f(CW\*(C`git pull\*(C'\fR):
|
657
|
+
.PP
|
658
|
+
.Vb 1
|
659
|
+
\& make install # Possibly with \*(Aqsudo\*(Aq
|
660
|
+
.Ve
|
661
|
+
.SH "Command Completion"
|
662
|
+
.IX Header "Command Completion"
|
663
|
+
The \f(CW\*(C`git subrepo\*(C'\fR command supports \f(CW\*(C`<TAB>\*(C'\fR\-based command completion. If
|
664
|
+
you don't use the \f(CW\*(C`.rc\*(C'\fR script (see Installation, above), you'll need to
|
665
|
+
enable this manually to use it.
|
666
|
+
.SS "In Bash"
|
667
|
+
.IX Subsection "In Bash"
|
668
|
+
If your Bash setup does not already provide command completion for Git, you'll
|
669
|
+
need to enable that first:
|
670
|
+
.PP
|
671
|
+
.Vb 1
|
672
|
+
\& source <Git completion script>
|
673
|
+
.Ve
|
674
|
+
.PP
|
675
|
+
On your system, the Git completion script might be found at any of the
|
676
|
+
following locations (or somewhere else that we don't know about):
|
677
|
+
.IP "\(bu" 4
|
678
|
+
\&\f(CW\*(C`/etc/bash_completion.d/git\*(C'\fR
|
679
|
+
.IP "\(bu" 4
|
680
|
+
\&\f(CW\*(C`/usr/share/bash\-completion/git\*(C'\fR
|
681
|
+
.IP "\(bu" 4
|
682
|
+
\&\f(CW\*(C`/usr/share/bash\-completion/completions/git\*(C'\fR
|
683
|
+
.IP "\(bu" 4
|
684
|
+
\&\f(CW\*(C`/opt/local/share/bash\-completion/completions/git\*(C'\fR
|
685
|
+
.IP "\(bu" 4
|
686
|
+
\&\f(CW\*(C`/usr/local/etc/bash_completion.d/git\*(C'\fR
|
687
|
+
.IP "\(bu" 4
|
688
|
+
\&\f(CW\*(C`~/.homebrew/etc/bash_completion.d/git\*(C'\fR
|
689
|
+
.PP
|
690
|
+
In case you can't find any of these, this repository contains a copy of the
|
691
|
+
Git completion script:
|
692
|
+
.PP
|
693
|
+
.Vb 1
|
694
|
+
\& source /path/to/git\-subrepo/share/git\-completion.bash
|
695
|
+
.Ve
|
696
|
+
.PP
|
697
|
+
Once Git completion is enabled (whether you needed to do that manually or
|
698
|
+
not), you can turn on \f(CW\*(C`git\-subrepo\*(C'\fR completion with a command like this:
|
699
|
+
.PP
|
700
|
+
.Vb 1
|
701
|
+
\& source /path/to/git\-subrepo/share/completion.bash
|
702
|
+
.Ve
|
703
|
+
.SS "In zsh"
|
704
|
+
.IX Subsection "In zsh"
|
705
|
+
In the Z shell (zsh), you can manually enable \f(CW\*(C`git\-subrepo\*(C'\fR completion by
|
706
|
+
adding the following line to your \f(CW\*(C`~/.zshrc\*(C'\fR, \fBbefore\fR the \f(CW\*(C`compinit\*(C'\fR
|
707
|
+
function is called:
|
708
|
+
.PP
|
709
|
+
.Vb 1
|
710
|
+
\& fpath=(\*(Aq/path/to/git\-subrepo/share/zsh\-completion\*(Aq $fpath)
|
711
|
+
.Ve
|
712
|
+
.SH "Status"
|
713
|
+
.IX Header "Status"
|
714
|
+
The git-subrepo command has been in use for well over a year and seems to get
|
715
|
+
the job done. Development is still ongoing but mostly just for fixing bugs.
|
716
|
+
.PP
|
717
|
+
Trying subrepo out is simple and painless (this is not \f(CW\*(C`git submodule\*(C'\fR).
|
718
|
+
Nothing is permanent (if you do not push to shared remotes). ie You can always
|
719
|
+
play around and reset back to the beginning without pain.
|
720
|
+
.PP
|
721
|
+
This command has a test suite (run \f(CW\*(C`make test\*(C'\fR), but surely has many bugs. If
|
722
|
+
you have expertise with Git and subcommands, please review the code, and file
|
723
|
+
issues on anything that seems wrong.
|
724
|
+
.PP
|
725
|
+
If you want to chat about the \f(CW\*(C`git\-subrepo\*(C'\fR command, join \f(CW\*(C`#gitcommands\*(C'\fR on
|
726
|
+
\&\f(CW\*(C`irc.freenode.net\*(C'\fR.
|
727
|
+
.SH "Notes"
|
728
|
+
.IX Header "Notes"
|
729
|
+
.IP "\(bu" 4
|
730
|
+
Works on \s-1POSIX\s0 systems: Linux, \s-1BSD, OSX,\s0 etc.
|
731
|
+
.IP "\(bu" 4
|
732
|
+
Works on various Windows environments. See \*(L"Windows\*(R" section above.
|
733
|
+
.IP "\(bu" 4
|
734
|
+
The \f(CW\*(C`git\-subrepo\*(C'\fR repo itself has 2 subrepos under the \f(CW\*(C`ext/\*(C'\fR subdirectory.
|
735
|
+
.IP "\(bu" 4
|
736
|
+
Written in (very modern) Bash, with full test suite. Take a look.
|
737
|
+
.IP "\(bu" 4
|
738
|
+
A \f(CW\*(C`.gitrepo\*(C'\fR file never is in the top level dir (next to a \f(CW\*(C`.git/\*(C'\fR dir).
|
739
|
+
.SH "Author"
|
740
|
+
.IX Header "Author"
|
741
|
+
Written by Ingy döt Net <ingy@ingy.net>
|
742
|
+
.SH "License and Copyright"
|
743
|
+
.IX Header "License and Copyright"
|
744
|
+
The \s-1MIT\s0 License (\s-1MIT\s0)
|
745
|
+
.PP
|
746
|
+
Copyright (c) 2013\-2017 Ingy döt Net
|