eac_tools 0.123.1 → 0.124.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (596) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +29 -39
  3. data/eac_tools.gemspec +2 -2
  4. data/lib/eac_tools/version.rb +1 -1
  5. data/sub/avm-eac_redmine_base0/.gitrepo +7 -0
  6. data/sub/avm-eac_redmine_base0/.rubocop.yml +2 -0
  7. data/sub/{avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec → avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec} +9 -7
  8. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/apache_host.rb +10 -0
  9. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/database.rb +27 -0
  10. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/files.rb +18 -0
  11. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/gitolite.rb +52 -0
  12. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/install.rb +43 -0
  13. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/nodejs.rb +21 -0
  14. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/web.rb +17 -0
  15. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base.rb +63 -0
  16. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/deploy.rb +16 -0
  17. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +110 -0
  18. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api/entity_base.rb +27 -0
  19. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api/project.rb +30 -0
  20. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api/root.rb +17 -0
  21. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api/wiki_page.rb +67 -0
  22. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api.rb +16 -0
  23. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/docker.rb +15 -0
  24. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project/wiki_page/read.rb +25 -0
  25. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project/wiki_page/write.rb +68 -0
  26. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project/wiki_page.rb +26 -0
  27. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project.rb +22 -0
  28. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project_rename.rb +53 -0
  29. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/base/default_settings.rb +45 -0
  30. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/base/update.rb +16 -0
  31. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/base.rb +34 -0
  32. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/core_update.rb +125 -0
  33. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/runners/core_update.rb +61 -0
  34. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/runners/docker.rb +16 -0
  35. data/sub/{avm-git/lib/avm/git → avm-eac_redmine_base0/lib/avm/eac_redmine_base0}/version.rb +2 -2
  36. data/sub/{avm-eac_ruby_base1/lib/avm/eac_ruby_base1.rb → avm-eac_redmine_base0/lib/avm/eac_redmine_base0.rb} +4 -3
  37. data/sub/avm-eac_redmine_base0/locale/en.yml +6 -0
  38. data/sub/avm-eac_redmine_base0/locale/pt-BR.yml +6 -0
  39. data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/apache_host_spec.rb +19 -0
  40. data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/apache_host_spec_files/apache_host_spec_no_ssl_content.conf +11 -0
  41. data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/base/gitolite_spec.rb +24 -0
  42. data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/base/gitolite_spec_files/config.yml +10 -0
  43. data/sub/{avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem → avm-eac_redmine_base0}/spec/spec_helper.rb +2 -1
  44. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/deploy/config/install.sh.template +46 -0
  45. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/deploy/config/secrets.yml +8 -0
  46. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/Dockerfile.template +37 -0
  47. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_host_dockerfile +8 -0
  48. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_http_virtualhost.conf.template +10 -0
  49. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_https_virtualhost.conf.template +16 -0
  50. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_path_dockerfile +5 -0
  51. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/start.sh.template +53 -0
  52. metadata +55 -559
  53. data/sub/avm-eac_ruby_base1/.gitignore +0 -2
  54. data/sub/avm-eac_ruby_base1/.gitrepo +0 -7
  55. data/sub/avm-eac_ruby_base1/.rubocop.yml +0 -3
  56. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile/add_or_replace_gem_line.rb +0 -54
  57. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile/dependency.rb +0 -17
  58. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile.rb +0 -32
  59. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/depends_on.rb +0 -22
  60. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/gem_conflict.rb +0 -41
  61. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/in_gemfile.rb +0 -14
  62. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/line_buffer.rb +0 -73
  63. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/line_factory.rb +0 -26
  64. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/line_parser_base.rb +0 -17
  65. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/ruby_requirement.rb +0 -13
  66. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/version_requirement.rb +0 -23
  67. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser.rb +0 -21
  68. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/file_formats/base/file_resource_name.rb +0 -44
  69. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/file_formats/base.rb +0 -20
  70. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/instances/mixin.rb +0 -24
  71. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher/gem/build.rb +0 -120
  72. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher/gem/specification.rb +0 -61
  73. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base/local_project_mixin.rb +0 -24
  74. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish/internal_check.rb +0 -71
  75. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish/local_gem.rb +0 -31
  76. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish/remote_gem.rb +0 -45
  77. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish.rb +0 -33
  78. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base.rb +0 -32
  79. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/preferred_version_requirements.rb +0 -40
  80. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rspec/setup.rb +0 -13
  81. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rspec/source_generator.rb +0 -20
  82. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/command/build.rb +0 -41
  83. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/command.rb +0 -80
  84. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/offense_set/file.rb +0 -51
  85. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/offense_set/line_processor.rb +0 -54
  86. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/offense_set/offense.rb +0 -34
  87. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/offense_set.rb +0 -28
  88. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/runner/configured.rb +0 -31
  89. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/runner/envvar.rb +0 -17
  90. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/runner/gemfile.rb +0 -41
  91. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/runner.rb +0 -56
  92. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gem_search_parser.rb +0 -34
  93. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gemspec/add_or_replace_gem_line.rb +0 -69
  94. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gemspec/dependency.rb +0 -28
  95. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gemspec.rb +0 -57
  96. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/providers/base/command_result_to_push_result.rb +0 -39
  97. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/providers/base.rb +0 -59
  98. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/providers/nexus.rb +0 -29
  99. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/providers/rubygems_org.rb +0 -42
  100. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/remote.rb +0 -31
  101. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/version_file.rb +0 -43
  102. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners/base/lib_rename.rb +0 -74
  103. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners/base/rubocop.rb +0 -27
  104. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners/base.rb +0 -14
  105. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners.rb +0 -8
  106. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/dependencies.rb +0 -59
  107. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/gemfile_lock.rb +0 -23
  108. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/gemspec.rb +0 -81
  109. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/options.rb +0 -32
  110. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/root_module.rb +0 -46
  111. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/version_builder.rb +0 -58
  112. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base.rb +0 -48
  113. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/bundle_command.rb +0 -35
  114. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/bundler.rb +0 -62
  115. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/gem_provider.rb +0 -46
  116. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rake.rb +0 -39
  117. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rubocop.rb +0 -34
  118. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rubocop_command.rb +0 -51
  119. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rubygems.rb +0 -50
  120. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/update.rb +0 -31
  121. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version.rb +0 -30
  122. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version_bump.rb +0 -16
  123. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb +0 -55
  124. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/bundle_update.rb +0 -21
  125. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/gemfile_local/sibling.rb +0 -51
  126. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/gemfile_local.rb +0 -65
  127. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/namespace_replacer.rb +0 -66
  128. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundle.rb +0 -26
  129. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_local.rb +0 -55
  130. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_lock/git.rb +0 -58
  131. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_lock.rb +0 -88
  132. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/incompatible.rb +0 -73
  133. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler.rb +0 -16
  134. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/base.rb +0 -57
  135. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/minitest.rb +0 -27
  136. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/multiple/decorated_gem.rb +0 -50
  137. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/multiple/result.rb +0 -29
  138. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/multiple.rb +0 -85
  139. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/rspec.rb +0 -23
  140. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update/changes/dependencies_requirements.rb +0 -57
  141. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update/changes/gemfile_lock.rb +0 -28
  142. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update/changes/rubocop_format.rb +0 -31
  143. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update/sub_update.rb +0 -57
  144. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +0 -7
  145. data/sub/avm-eac_ruby_base1/locale/en.yml +0 -21
  146. data/sub/avm-eac_ruby_base1/locale/pt-BR.yml +0 -21
  147. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec.rb +0 -5
  148. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/1.source.out +0 -192
  149. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/1.target.yaml +0 -300
  150. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/2.source.out +0 -245
  151. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/2.target.yaml +0 -355
  152. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/3.source.out +0 -0
  153. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/3.target.yaml +0 -305
  154. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec.rb +0 -13
  155. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec_files/Gemfile.source +0 -6
  156. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec_files/Gemfile.target +0 -3
  157. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec_files/ruby_code.rb.source +0 -6
  158. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec_files/ruby_code.rb.target +0 -5
  159. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher/gem/build_spec.rb +0 -43
  160. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher/gem/specification_spec.rb +0 -57
  161. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish_spec.rb +0 -25
  162. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher_stereotypes/base_spec.rb +0 -21
  163. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/preferred_version_requirements_spec.rb +0 -21
  164. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/gem_search_parser_spec.rb +0 -5
  165. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/gem_search_parser_spec_files/empty.source +0 -1
  166. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/gem_search_parser_spec_files/empty.target.yaml +0 -1
  167. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/gem_search_parser_spec_files/many_versions.source +0 -1
  168. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/gem_search_parser_spec_files/many_versions.target.yaml +0 -123
  169. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/gemspec_spec.rb +0 -35
  170. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/gemspec_spec_files/changes1.source.yaml +0 -5
  171. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/gemspec_spec_files/changes1.target.txt +0 -15
  172. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/gemspec_spec_files/the_gem.gemspec +0 -15
  173. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/version_file_spec.rb +0 -13
  174. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/version_file_spec_files/a_version_file.rb +0 -7
  175. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb +0 -33
  176. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir1/.avm.yml +0 -4
  177. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir1/dir3/Gemfile +0 -7
  178. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir1/dir3/Gemfile.lock +0 -31
  179. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir2/empty.rb +0 -1
  180. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir4/.avm.yml +0 -4
  181. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir4/false_command.rb +0 -4
  182. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec.rb +0 -16
  183. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/.rspec +0 -1
  184. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/.rubocop.yml +0 -3
  185. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/Gemfile +0 -8
  186. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/Gemfile.lock +0 -1
  187. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/_gitignore +0 -2
  188. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/dashed-mygem.gemspec +0 -20
  189. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/lib/dashed/mygem/version.rb +0 -7
  190. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/lib/dashed/mygem.rb +0 -4
  191. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/.rspec +0 -1
  192. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/.rubocop.yml +0 -3
  193. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/Gemfile +0 -8
  194. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/Gemfile.lock +0 -1
  195. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/_gitignore +0 -2
  196. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/lib/mygem/version.rb +0 -5
  197. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/lib/mygem.rb +0 -4
  198. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/mygem.gemspec +0 -20
  199. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/spec/spec_helper.rb +0 -5
  200. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec.rb +0 -28
  201. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/Gemfile +0 -5
  202. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/Gemfile.lock +0 -19
  203. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/Rakefile +0 -14
  204. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/exe/myrunner +0 -5
  205. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/lib/mygem/version.rb +0 -5
  206. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/lib/mygem.rb +0 -7
  207. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/mygem.gemspec +0 -17
  208. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base_spec.rb +0 -13
  209. data/sub/avm-eac_ruby_base1/spec/spec_helper.rb +0 -5
  210. data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/gemspec.template +0 -19
  211. data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/root_lib.template +0 -4
  212. data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/.gitignore +0 -2
  213. data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/.rspec +0 -1
  214. data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/.rubocop.yml +0 -3
  215. data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/Gemfile +0 -8
  216. data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/spec/spec_helper.rb.template +0 -5
  217. data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/version.template +0 -5
  218. data/sub/avm-git/.gitrepo +0 -7
  219. data/sub/avm-git/.rspec +0 -1
  220. data/sub/avm-git/.rubocop.yml +0 -6
  221. data/sub/avm-git/Gemfile +0 -8
  222. data/sub/avm-git/avm-git.gemspec +0 -25
  223. data/sub/avm-git/lib/avm/git/application_scms/base/assert_main_at.rb +0 -44
  224. data/sub/avm-git/lib/avm/git/application_scms/base.rb +0 -18
  225. data/sub/avm-git/lib/avm/git/commit/class_methods.rb +0 -29
  226. data/sub/avm-git/lib/avm/git/commit/diff_tree_line.rb +0 -32
  227. data/sub/avm-git/lib/avm/git/commit/file.rb +0 -42
  228. data/sub/avm-git/lib/avm/git/commit.rb +0 -57
  229. data/sub/avm-git/lib/avm/git/issue/complete/commits.rb +0 -40
  230. data/sub/avm-git/lib/avm/git/issue/complete/git_subrepos.rb +0 -20
  231. data/sub/avm-git/lib/avm/git/issue/complete/local_branch.rb +0 -59
  232. data/sub/avm-git/lib/avm/git/issue/complete/local_tag.rb +0 -37
  233. data/sub/avm-git/lib/avm/git/issue/complete/push.rb +0 -60
  234. data/sub/avm-git/lib/avm/git/issue/complete/remote.rb +0 -33
  235. data/sub/avm-git/lib/avm/git/issue/complete/test.rb +0 -34
  236. data/sub/avm-git/lib/avm/git/issue/complete/tracker.rb +0 -21
  237. data/sub/avm-git/lib/avm/git/issue/complete/validation.rb +0 -36
  238. data/sub/avm-git/lib/avm/git/issue/complete/validations.rb +0 -54
  239. data/sub/avm-git/lib/avm/git/issue/complete/working_tree.rb +0 -19
  240. data/sub/avm-git/lib/avm/git/issue/complete.rb +0 -66
  241. data/sub/avm-git/lib/avm/git/launcher/base/class_methods.rb +0 -28
  242. data/sub/avm-git/lib/avm/git/launcher/base/dirty_files.rb +0 -21
  243. data/sub/avm-git/lib/avm/git/launcher/base/remotes.rb +0 -37
  244. data/sub/avm-git/lib/avm/git/launcher/base/subrepo.rb +0 -42
  245. data/sub/avm-git/lib/avm/git/launcher/base/underlying.rb +0 -54
  246. data/sub/avm-git/lib/avm/git/launcher/base.rb +0 -80
  247. data/sub/avm-git/lib/avm/git/launcher/error.rb +0 -13
  248. data/sub/avm-git/lib/avm/git/launcher/mirror_update.rb +0 -36
  249. data/sub/avm-git/lib/avm/git/launcher/publish_base.rb +0 -128
  250. data/sub/avm-git/lib/avm/git/launcher/remote.rb +0 -53
  251. data/sub/avm-git/lib/avm/git/launcher/sub_warp_base.rb +0 -36
  252. data/sub/avm-git/lib/avm/git/launcher/warp_base.rb +0 -63
  253. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/local_project_mixin.rb +0 -16
  254. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/publish.rb +0 -13
  255. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/warp.rb +0 -25
  256. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git.rb +0 -21
  257. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/publish.rb +0 -29
  258. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/warp.rb +0 -82
  259. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo.rb +0 -31
  260. data/sub/avm-git/lib/avm/git/launcher_stereotypes/provider.rb +0 -16
  261. data/sub/avm-git/lib/avm/git/organize/reference_update.rb +0 -32
  262. data/sub/avm-git/lib/avm/git/organize/repository.rb +0 -74
  263. data/sub/avm-git/lib/avm/git/revision_test.rb +0 -102
  264. data/sub/avm-git/lib/avm/git/runners/base/commit.rb +0 -98
  265. data/sub/avm-git/lib/avm/git/runners/base/deploy.rb +0 -108
  266. data/sub/avm-git/lib/avm/git/runners/base/dirty_files.rb +0 -42
  267. data/sub/avm-git/lib/avm/git/runners/base/organize.rb +0 -72
  268. data/sub/avm-git/lib/avm/git/runners/base/revisions_test.rb +0 -63
  269. data/sub/avm-git/lib/avm/git/runners/base/subrepo/check.rb +0 -45
  270. data/sub/avm-git/lib/avm/git/runners/base/subrepo/clone.rb +0 -80
  271. data/sub/avm-git/lib/avm/git/runners/base/subrepo/fix.rb +0 -69
  272. data/sub/avm-git/lib/avm/git/runners/base/subrepo.rb +0 -16
  273. data/sub/avm-git/lib/avm/git/runners/base.rb +0 -39
  274. data/sub/avm-git/lib/avm/git/scms/git/branch.rb +0 -28
  275. data/sub/avm-git/lib/avm/git/scms/git/branches.rb +0 -17
  276. data/sub/avm-git/lib/avm/git/scms/git/change_tracker.rb +0 -34
  277. data/sub/avm-git/lib/avm/git/scms/git/changed_file.rb +0 -25
  278. data/sub/avm-git/lib/avm/git/scms/git/changed_files.rb +0 -21
  279. data/sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb +0 -38
  280. data/sub/avm-git/lib/avm/git/scms/git/commit/deploy_methods.rb +0 -24
  281. data/sub/avm-git/lib/avm/git/scms/git/commit.rb +0 -64
  282. data/sub/avm-git/lib/avm/git/scms/git/commit_dirty.rb +0 -32
  283. data/sub/avm-git/lib/avm/git/scms/git/commits.rb +0 -44
  284. data/sub/avm-git/lib/avm/git/scms/git/interval.rb +0 -28
  285. data/sub/avm-git/lib/avm/git/scms/git/milestones.rb +0 -18
  286. data/sub/avm-git/lib/avm/git/scms/git/remote.rb +0 -18
  287. data/sub/avm-git/lib/avm/git/scms/git/remotes.rb +0 -29
  288. data/sub/avm-git/lib/avm/git/scms/git/run_commit.rb +0 -54
  289. data/sub/avm-git/lib/avm/git/scms/git.rb +0 -46
  290. data/sub/avm-git/lib/avm/git/scms/git_sub_base/changed_file.rb +0 -19
  291. data/sub/avm-git/lib/avm/git/scms/git_sub_base/commit.rb +0 -23
  292. data/sub/avm-git/lib/avm/git/scms/git_sub_base/interval.rb +0 -23
  293. data/sub/avm-git/lib/avm/git/scms/git_sub_base.rb +0 -28
  294. data/sub/avm-git/lib/avm/git/scms/git_subrepo.rb +0 -28
  295. data/sub/avm-git/lib/avm/git/scms/git_subtree.rb +0 -29
  296. data/sub/avm-git/lib/avm/git/scms/provider.rb +0 -16
  297. data/sub/avm-git/lib/avm/git/subrepo_check/parent.rb +0 -48
  298. data/sub/avm-git/lib/avm/git/subrepo_check/remote.rb +0 -86
  299. data/sub/avm-git/lib/avm/git/subrepo_check/show_result.rb +0 -30
  300. data/sub/avm-git/lib/avm/git/subrepo_check.rb +0 -36
  301. data/sub/avm-git/lib/avm/git/subrepo_checks.rb +0 -57
  302. data/sub/avm-git/lib/avm/git/vendor/github.rb +0 -20
  303. data/sub/avm-git/lib/avm/git.rb +0 -15
  304. data/sub/avm-git/locale/en.yml +0 -6
  305. data/sub/avm-git/locale/pt-BR.yml +0 -6
  306. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec.rb +0 -11
  307. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.source.out +0 -1
  308. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.target.yaml +0 -7
  309. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.source.out +0 -1
  310. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.target.yaml +0 -7
  311. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.source.out +0 -1
  312. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.target.yaml +0 -7
  313. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.source.out +0 -2
  314. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.target.yaml +0 -13
  315. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.source.out +0 -2
  316. data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.target.yaml +0 -13
  317. data/sub/avm-git/spec/lib/avm/git/commit_spec.rb +0 -54
  318. data/sub/avm-git/spec/lib/avm/git/launcher/base_spec.rb +0 -43
  319. data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec.rb +0 -82
  320. data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec_files/config.yml +0 -5
  321. data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec_settings.yml +0 -6
  322. data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec.rb +0 -53
  323. data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec_files/config.yml +0 -3
  324. data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec_settings.yml +0 -6
  325. data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec.rb +0 -124
  326. data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec_files/append1/stub3.txt.template +0 -1
  327. data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec_files/append2/stub4.txt +0 -1
  328. data/sub/avm-git/spec/lib/avm/git/scms/git/commit/deploy_spec.rb +0 -89
  329. data/sub/avm-git/spec/lib/avm/git/scms/git_spec.rb +0 -5
  330. data/sub/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb +0 -5
  331. data/sub/avm-git/spec/lib/avm/git/vendor/github_spec.rb +0 -21
  332. data/sub/avm-git/spec/meta/rubocop_spec.rb +0 -3
  333. data/sub/avm-git/spec/spec_helper.rb +0 -5
  334. data/sub/eac_git/.gitignore +0 -2
  335. data/sub/eac_git/.gitrepo +0 -7
  336. data/sub/eac_git/.rspec +0 -1
  337. data/sub/eac_git/.rubocop.yml +0 -3
  338. data/sub/eac_git/Gemfile +0 -8
  339. data/sub/eac_git/eac_git.gemspec +0 -21
  340. data/sub/eac_git/lib/eac_git/executables.rb +0 -45
  341. data/sub/eac_git/lib/eac_git/local/branch.rb +0 -45
  342. data/sub/eac_git/lib/eac_git/local/changed_file.rb +0 -53
  343. data/sub/eac_git/lib/eac_git/local/commit/archive.rb +0 -17
  344. data/sub/eac_git/lib/eac_git/local/commit/changed_file.rb +0 -43
  345. data/sub/eac_git/lib/eac_git/local/commit/diff_tree_line.rb +0 -32
  346. data/sub/eac_git/lib/eac_git/local/commit.rb +0 -71
  347. data/sub/eac_git/lib/eac_git/local/dirty_files.rb +0 -26
  348. data/sub/eac_git/lib/eac_git/local/log.rb +0 -14
  349. data/sub/eac_git/lib/eac_git/local/remote/push.rb +0 -33
  350. data/sub/eac_git/lib/eac_git/local/remote.rb +0 -71
  351. data/sub/eac_git/lib/eac_git/local/remotes.rb +0 -17
  352. data/sub/eac_git/lib/eac_git/local/subrepo.rb +0 -46
  353. data/sub/eac_git/lib/eac_git/local.rb +0 -124
  354. data/sub/eac_git/lib/eac_git/remote.rb +0 -20
  355. data/sub/eac_git/lib/eac_git/remote_like/ls_result.rb +0 -19
  356. data/sub/eac_git/lib/eac_git/remote_like.rb +0 -29
  357. data/sub/eac_git/lib/eac_git/rspec/setup.rb +0 -20
  358. data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo/directory.rb +0 -35
  359. data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo/file.rb +0 -21
  360. data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo/fs_object.rb +0 -25
  361. data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo/repository.rb +0 -30
  362. data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo.rb +0 -26
  363. data/sub/eac_git/lib/eac_git/rspec.rb +0 -6
  364. data/sub/eac_git/lib/eac_git/subrepo/configuration.rb +0 -40
  365. data/sub/eac_git/lib/eac_git/version.rb +0 -5
  366. data/sub/eac_git/lib/eac_git.rb +0 -7
  367. data/sub/eac_git/spec/lib/eac_git/executables_spec.rb +0 -11
  368. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec.rb +0 -11
  369. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/add.source.out +0 -1
  370. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/add.target.yaml +0 -7
  371. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/modify.source.out +0 -1
  372. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/modify.target.yaml +0 -7
  373. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/remove.source.out +0 -1
  374. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/remove.target.yaml +0 -7
  375. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename.source.out +0 -2
  376. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename.target.yaml +0 -13
  377. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename_modify.source.out +0 -2
  378. data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename_modify.target.yaml +0 -13
  379. data/sub/eac_git/spec/lib/eac_git/local/commit_spec.rb +0 -56
  380. data/sub/eac_git/spec/lib/eac_git/local/dirty_files_spec.rb +0 -18
  381. data/sub/eac_git/spec/rubocop_spec.rb +0 -3
  382. data/sub/eac_git/spec/spec_helper.rb +0 -5
  383. data/sub/eac_git/vendor/git-subrepo/.fish.rc +0 -20
  384. data/sub/eac_git/vendor/git-subrepo/.gitattributes +0 -1
  385. data/sub/eac_git/vendor/git-subrepo/.github/workflows/test.yml +0 -29
  386. data/sub/eac_git/vendor/git-subrepo/.gitignore +0 -1
  387. data/sub/eac_git/vendor/git-subrepo/.gitrepo +0 -7
  388. data/sub/eac_git/vendor/git-subrepo/.rc +0 -32
  389. data/sub/eac_git/vendor/git-subrepo/Changes +0 -176
  390. data/sub/eac_git/vendor/git-subrepo/Intro.pod +0 -506
  391. data/sub/eac_git/vendor/git-subrepo/License +0 -21
  392. data/sub/eac_git/vendor/git-subrepo/Makefile +0 -122
  393. data/sub/eac_git/vendor/git-subrepo/Meta +0 -28
  394. data/sub/eac_git/vendor/git-subrepo/ReadMe.pod +0 -693
  395. data/sub/eac_git/vendor/git-subrepo/doc/comparison.swim +0 -35
  396. data/sub/eac_git/vendor/git-subrepo/doc/git-subrepo.swim +0 -612
  397. data/sub/eac_git/vendor/git-subrepo/doc/intro-to-subrepo.swim +0 -385
  398. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/.gitrepo +0 -12
  399. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/.travis.yml +0 -6
  400. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/Changes +0 -34
  401. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/License +0 -21
  402. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/Makefile +0 -70
  403. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/Meta +0 -28
  404. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/ReadMe.pod +0 -77
  405. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/bin/bash+ +0 -44
  406. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/doc/bash+.swim +0 -61
  407. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/lib/bash+.bash +0 -139
  408. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/man/man1/bash+.1 +0 -134
  409. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/man/man3/bash+.3 +0 -134
  410. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/base.t +0 -11
  411. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/die.t +0 -16
  412. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/fcopy.t +0 -21
  413. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/lib/foo/bar.bash +0 -3
  414. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/lib/foo/foo.bash +0 -3
  415. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/setup +0 -80
  416. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/shellcheck.t +0 -37
  417. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/source-bash+-std.t +0 -17
  418. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/source-bash+.t +0 -22
  419. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/use.t +0 -22
  420. data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/version-check.t +0 -23
  421. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/.gitrepo +0 -12
  422. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/.travis.yml +0 -6
  423. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/Changes +0 -26
  424. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/License +0 -21
  425. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/Makefile +0 -45
  426. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/Meta +0 -30
  427. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ReadMe.pod +0 -121
  428. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/doc/test-more.swim +0 -94
  429. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/.gitrepo +0 -12
  430. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/.travis.yml +0 -6
  431. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Changes +0 -26
  432. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/License +0 -21
  433. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Makefile +0 -70
  434. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Meta +0 -28
  435. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/ReadMe.pod +0 -77
  436. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/bin/bash+ +0 -44
  437. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/doc/bash+.swim +0 -61
  438. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/lib/bash+.bash +0 -139
  439. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man1/bash+.1 +0 -134
  440. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man3/bash+.3 +0 -134
  441. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/base.t +0 -12
  442. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/die.t +0 -17
  443. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/fcopy.t +0 -22
  444. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/lib/foo/bar.bash +0 -3
  445. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/lib/foo/foo.bash +0 -3
  446. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/setup +0 -79
  447. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/shellcheck.t +0 -38
  448. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+-std.t +0 -18
  449. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+.t +0 -23
  450. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/use.t +0 -23
  451. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/.gitrepo +0 -12
  452. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/.travis.yml +0 -5
  453. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Changes +0 -26
  454. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/License +0 -21
  455. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Makefile +0 -67
  456. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Meta +0 -28
  457. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/ReadMe.pod +0 -66
  458. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/doc/test-tap.swim +0 -48
  459. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/lib/test/tap.bash +0 -157
  460. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/man/man3/test-tap.3 +0 -119
  461. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/bail_out.t +0 -13
  462. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/done.t +0 -10
  463. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail.t +0 -20
  464. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail_fast.t +0 -15
  465. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/helper.bash +0 -9
  466. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/pass.t +0 -9
  467. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/plan.t +0 -10
  468. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/shellcheck.t +0 -42
  469. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/skip_all.t +0 -20
  470. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/tap.t +0 -19
  471. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/bail.t +0 -14
  472. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/fail.t +0 -7
  473. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/fail_fast.t +0 -12
  474. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/skip-all-init.t +0 -8
  475. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/skip-all-plan.t +0 -9
  476. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/lib/test/more.bash +0 -115
  477. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/man/man3/test-more.3 +0 -179
  478. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/fail.t +0 -34
  479. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/more.t +0 -28
  480. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/pass.t +0 -9
  481. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/setup +0 -8
  482. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/shellcheck.t +0 -35
  483. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/skip_all.t +0 -11
  484. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/test/fail1.t +0 -25
  485. data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/test/skip_all.t +0 -10
  486. data/sub/eac_git/vendor/git-subrepo/lib/git-subrepo +0 -2018
  487. data/sub/eac_git/vendor/git-subrepo/lib/git-subrepo.d/bash+.bash +0 -1
  488. data/sub/eac_git/vendor/git-subrepo/lib/git-subrepo.d/help-functions.bash +0 -338
  489. data/sub/eac_git/vendor/git-subrepo/man/man1/git-subrepo.1 +0 -727
  490. data/sub/eac_git/vendor/git-subrepo/note/0.4.0 +0 -12
  491. data/sub/eac_git/vendor/git-subrepo/note/AllGitCmds +0 -148
  492. data/sub/eac_git/vendor/git-subrepo/note/Cases +0 -32
  493. data/sub/eac_git/vendor/git-subrepo/note/Commands +0 -33
  494. data/sub/eac_git/vendor/git-subrepo/note/Dags +0 -199
  495. data/sub/eac_git/vendor/git-subrepo/note/Gists +0 -7
  496. data/sub/eac_git/vendor/git-subrepo/note/Links +0 -25
  497. data/sub/eac_git/vendor/git-subrepo/note/Plugins +0 -10
  498. data/sub/eac_git/vendor/git-subrepo/note/Spec +0 -39
  499. data/sub/eac_git/vendor/git-subrepo/note/Story1 +0 -57
  500. data/sub/eac_git/vendor/git-subrepo/note/ToDo +0 -55
  501. data/sub/eac_git/vendor/git-subrepo/note/design.swim +0 -137
  502. data/sub/eac_git/vendor/git-subrepo/note/design2.swim +0 -85
  503. data/sub/eac_git/vendor/git-subrepo/note/init-test +0 -38
  504. data/sub/eac_git/vendor/git-subrepo/note/pull-dance.txt +0 -18
  505. data/sub/eac_git/vendor/git-subrepo/note/recreate-rebase-conflict.sh +0 -56
  506. data/sub/eac_git/vendor/git-subrepo/note/subtree-rebase-fail-example/test.bash +0 -29
  507. data/sub/eac_git/vendor/git-subrepo/note/test-subrepo-push.sh +0 -69
  508. data/sub/eac_git/vendor/git-subrepo/note/test.sh +0 -58
  509. data/sub/eac_git/vendor/git-subrepo/pkg/bin/generate-completion.pl +0 -203
  510. data/sub/eac_git/vendor/git-subrepo/pkg/bin/generate-help-functions.pl +0 -87
  511. data/sub/eac_git/vendor/git-subrepo/share/completion.bash +0 -40
  512. data/sub/eac_git/vendor/git-subrepo/share/enable-completion.sh +0 -50
  513. data/sub/eac_git/vendor/git-subrepo/share/git-completion.bash +0 -2738
  514. data/sub/eac_git/vendor/git-subrepo/share/zsh-completion/_git-subrepo +0 -76
  515. data/sub/eac_git/vendor/git-subrepo/test/Dockerfile +0 -112
  516. data/sub/eac_git/vendor/git-subrepo/test/branch-all.t +0 -41
  517. data/sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t +0 -42
  518. data/sub/eac_git/vendor/git-subrepo/test/branch-rev-list.t +0 -46
  519. data/sub/eac_git/vendor/git-subrepo/test/branch.t +0 -52
  520. data/sub/eac_git/vendor/git-subrepo/test/clean.t +0 -43
  521. data/sub/eac_git/vendor/git-subrepo/test/clone-annotated-tag.t +0 -45
  522. data/sub/eac_git/vendor/git-subrepo/test/clone.t +0 -102
  523. data/sub/eac_git/vendor/git-subrepo/test/compile.t +0 -19
  524. data/sub/eac_git/vendor/git-subrepo/test/config.t +0 -59
  525. data/sub/eac_git/vendor/git-subrepo/test/encode.t +0 -91
  526. data/sub/eac_git/vendor/git-subrepo/test/error.t +0 -171
  527. data/sub/eac_git/vendor/git-subrepo/test/fetch.t +0 -43
  528. data/sub/eac_git/vendor/git-subrepo/test/gitignore.t +0 -61
  529. data/sub/eac_git/vendor/git-subrepo/test/init.t +0 -63
  530. data/sub/eac_git/vendor/git-subrepo/test/issue29.t +0 -98
  531. data/sub/eac_git/vendor/git-subrepo/test/issue95.t +0 -98
  532. data/sub/eac_git/vendor/git-subrepo/test/issue96.t +0 -96
  533. data/sub/eac_git/vendor/git-subrepo/test/pull-all.t +0 -38
  534. data/sub/eac_git/vendor/git-subrepo/test/pull-merge.t +0 -114
  535. data/sub/eac_git/vendor/git-subrepo/test/pull-message.t +0 -88
  536. data/sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t +0 -59
  537. data/sub/eac_git/vendor/git-subrepo/test/pull-ours.t +0 -90
  538. data/sub/eac_git/vendor/git-subrepo/test/pull-theirs.t +0 -82
  539. data/sub/eac_git/vendor/git-subrepo/test/pull-twice.t +0 -44
  540. data/sub/eac_git/vendor/git-subrepo/test/pull-worktree.t +0 -40
  541. data/sub/eac_git/vendor/git-subrepo/test/pull.t +0 -99
  542. data/sub/eac_git/vendor/git-subrepo/test/push-after-init.t +0 -52
  543. data/sub/eac_git/vendor/git-subrepo/test/push-after-push-no-changes.t +0 -27
  544. data/sub/eac_git/vendor/git-subrepo/test/push-force.t +0 -57
  545. data/sub/eac_git/vendor/git-subrepo/test/push-new-branch.t +0 -61
  546. data/sub/eac_git/vendor/git-subrepo/test/push-no-changes.t +0 -29
  547. data/sub/eac_git/vendor/git-subrepo/test/push-squash.t +0 -56
  548. data/sub/eac_git/vendor/git-subrepo/test/push.t +0 -177
  549. data/sub/eac_git/vendor/git-subrepo/test/rebase.t +0 -63
  550. data/sub/eac_git/vendor/git-subrepo/test/reclone.t +0 -52
  551. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/HEAD +0 -1
  552. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/config +0 -4
  553. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/1f/0c4b264caed0126814a0ede851a1e0b4e16ae6 +0 -0
  554. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/87/46903fdb1b9c2101377880125917c2e05b4d69 +0 -0
  555. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/94/c86ffc745232d89f78c6f895e11e71272518db +0 -0
  556. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/c6/76c57b6576743fa56278527aa60ebd2e202a7c +0 -0
  557. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
  558. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/f6/2a8ff3feadf39b0a98f1a86ec6d1eb33858ee9 +0 -0
  559. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/refs/heads/master +0 -1
  560. data/sub/eac_git/vendor/git-subrepo/test/repo/bar/refs/tags/A +0 -1
  561. data/sub/eac_git/vendor/git-subrepo/test/repo/foo/HEAD +0 -1
  562. data/sub/eac_git/vendor/git-subrepo/test/repo/foo/config +0 -4
  563. data/sub/eac_git/vendor/git-subrepo/test/repo/foo/objects/a0/f4cdaaf533a936296cdebbed8206c3b9ededa8 +0 -0
  564. data/sub/eac_git/vendor/git-subrepo/test/repo/foo/objects/e2/1291a1ad392a9d4c51dd9586804f1467b28afd +0 -0
  565. data/sub/eac_git/vendor/git-subrepo/test/repo/foo/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
  566. data/sub/eac_git/vendor/git-subrepo/test/repo/foo/refs/heads/master +0 -1
  567. data/sub/eac_git/vendor/git-subrepo/test/repo/init/HEAD +0 -1
  568. data/sub/eac_git/vendor/git-subrepo/test/repo/init/config +0 -5
  569. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/11/523f5dcf03b4c89b592dc8a3d0308f68da2386 +0 -0
  570. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/14/2addf8ec5f37334e837440122c62f2c68a29ad +0 -0
  571. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/32/5180321750a21cd7a4e7ecda319e557a4f6a09 +0 -2
  572. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/3d/918c6901c02f43af5d31779dd5e1f9166aeb36 +0 -0
  573. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/3e/4cb596066dce63ba4d047abddb677389b65e19 +0 -0
  574. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/4b/6e53022e7a04f07887697e4f3d7c377fd9822b +0 -0
  575. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/58/931fc1bd559b59c41ea738fc7ad04f9ad01bd3 +0 -0
  576. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/5e/c0c28e1b806f25efdca18fcf7a74b49c3755bd +0 -0
  577. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/75/fa6584e748f57eff06eebdc55e9ac21d4fcbf2 +0 -1
  578. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/80/2d5edbd5e1cb7fca82b5bd38e7c8a0a496fb20 +0 -0
  579. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/94/7b3d714c38791e95ad6f928b48c98bb8708acd +0 -0
  580. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/95/e1f2df3f4d5f3d7a60588c25a7ca8a913d3c2a +0 -1
  581. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/b1/5f4a7666baf40d949548ead946a3370e273479 +0 -0
  582. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/c3/ee8978c4c5d84c3b7d00ba8e5906933d027882 +0 -0
  583. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/c8/b0bffbc405ef3fad7354ff833fbec36d67ddfa +0 -3
  584. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/dd/8bdb934ec848137f011fe423b185505c343626 +0 -2
  585. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/e2/9be58c767cfeb27235c995d293a7d71aac0135 +0 -2
  586. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/ee/1224401fc6aac595145fa727dcf6706ac8aec1 +0 -1
  587. data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/f1/cc1a657b2e805c400f5dcaaa76bd29c6178b1b +0 -0
  588. data/sub/eac_git/vendor/git-subrepo/test/repo/init/refs/heads/master +0 -1
  589. data/sub/eac_git/vendor/git-subrepo/test/setup +0 -212
  590. data/sub/eac_git/vendor/git-subrepo/test/shellcheck.t +0 -37
  591. data/sub/eac_git/vendor/git-subrepo/test/status.t +0 -88
  592. data/sub/eac_git/vendor/git-subrepo/test/submodule.t +0 -45
  593. data/sub/eac_git/vendor/git-subrepo/test/zsh.t +0 -27
  594. /data/sub/{avm-git → avm-eac_redmine_base0}/.gitignore +0 -0
  595. /data/sub/{avm-eac_ruby_base1 → avm-eac_redmine_base0}/.rspec +0 -0
  596. /data/sub/{avm-eac_ruby_base1 → avm-eac_redmine_base0}/Gemfile +0 -0
@@ -1,2018 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- #
4
- # Copyright 2013-2020 - Ingy döt Net <ingy@ingy.net>
5
- #
6
-
7
- # shellcheck disable=1090,1091,2034
8
-
9
- # Exit on any errors:
10
- set -e
11
-
12
- export FILTER_BRANCH_SQUELCH_WARNING=1
13
-
14
- # Import Bash+ helper functions:
15
- SOURCE=${BASH_SOURCE[0]}
16
- while [[ -h $SOURCE ]]; do
17
- DIR=$( cd -P "$( dirname "$SOURCE" )" && pwd )
18
- SOURCE=$(readlink "$SOURCE")
19
- [[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE
20
- done
21
- SOURCE_DIR=$(dirname "$SOURCE")
22
-
23
- if [[ -z $GIT_SUBREPO_ROOT ]]; then
24
- # If `make install` installation used:
25
- source "${SOURCE_DIR}/git-subrepo.d/bash+.bash"
26
- else
27
- # If `source .rc` method used:
28
- source "${SOURCE_DIR}/../ext/bashplus/lib/bash+.bash"
29
- fi
30
- bash+:import :std can version-check
31
-
32
-
33
- VERSION=0.4.9
34
- REQUIRED_BASH_VERSION=4.0
35
- REQUIRED_GIT_VERSION=2.7.0
36
- GIT_TMP=$(git rev-parse --git-common-dir 2> /dev/null || echo .git)/tmp
37
-
38
- # `git rev-parse` turns this into a getopt parser and a command usage message:
39
- GETOPT_SPEC="\
40
- git subrepo <command> <arguments> <options>
41
-
42
- Commands:
43
- clone Clone a remote repository into a local subdirectory
44
- init Turn a current subdirectory into a subrepo
45
- pull Pull upstream changes to the subrepo
46
- push Push local subrepo changes upstream
47
-
48
- fetch Fetch a subrepo's remote branch (and create a ref for it)
49
- branch Create a branch containing the local subrepo commits
50
- commit Commit a merged subrepo branch into the mainline
51
-
52
- status Get status of a subrepo (or all of them)
53
- clean Remove branches, remotes and refs for a subrepo
54
- config Set subrepo configuration properties
55
-
56
- help Documentation for git-subrepo (or specific command)
57
- version Display git-subrepo version info
58
- upgrade Upgrade the git-subrepo software itself
59
-
60
- See 'git help subrepo' for complete documentation and usage of each command.
61
-
62
- Options:
63
- --
64
- h Show the command summary
65
- help Help overview
66
- version Print the git-subrepo version number
67
-
68
- a,all Perform command on all current subrepos
69
- A,ALL Perform command on all subrepos and subsubrepos
70
- b,branch= Specify the upstream branch to push/pull/fetch
71
- e,edit Edit commit message
72
- f,force Force certain operations
73
- F,fetch Fetch the upstream content first
74
- M,method= Join method: 'merge' (default) or 'rebase'
75
- m,message= Specify a commit message
76
- file= Specify a commit message file
77
- r,remote= Specify the upstream remote to push/pull/fetch
78
- s,squash Squash commits on push
79
- u,update Add the --branch and/or --remote overrides to .gitrepo
80
-
81
- q,quiet Show minimal output
82
- v,verbose Show verbose output
83
- d,debug Show the actual commands used
84
- x,DEBUG Turn on -x Bash debugging
85
- "
86
-
87
- #------------------------------------------------------------------------------
88
- # Top level function:
89
- #------------------------------------------------------------------------------
90
- main() {
91
- # Define global variables:
92
- local command= # Subrepo subcommand to run
93
- local command_arguments=() # Command args after getopt parsing
94
- local commit_msg_args=() # Arguments to show in the commit msg
95
- local subrepos=() # List of multiple subrepos
96
-
97
- local all_wanted=false # Apply command to all subrepos
98
- local ALL_wanted=false # Apply command to all subrepos and subsubrepos
99
- local force_wanted=false # Force certain operations
100
- local fetch_wanted=false # Fetch requested before a command
101
- local squash_wanted=false # Squash commits on push
102
- local update_wanted=false # Update .gitrepo with --branch and/or --remote
103
-
104
- local quiet_wanted=false # Output should be quiet
105
- local verbose_wanted=false # Output should be verbose
106
- local debug_wanted=false # Show debug messages
107
-
108
- local subdir= # Subdirectory of the subrepo being used
109
- local subref= # Valid git ref format of subdir
110
- local gitrepo= # Path to .gitrepo file
111
- local worktree= # Worktree created by 'git worktree'
112
- local start_pwd
113
- start_pwd=$(pwd) # Store the original directory
114
-
115
- local original_head_commit= # HEAD commit id at start of command
116
- local original_head_branch= # HEAD ref at start of command
117
- local upstream_head_commit= # HEAD commit id from a subrepo fetch
118
-
119
- local subrepo_remote= # Remote url for subrepo's upstream repo
120
- local subrepo_branch= # Upstream branch to clone/push/pull
121
- local subrepo_commit= # Upstream HEAD from previous clone/pull
122
- local subrepo_parent= # Local commit from before previous clone/pull
123
- local subrepo_former= # A retired gitrepo key that might still exist
124
-
125
- local refs_subrepo_branch= # A subrepo ref -> commit of branch/pull command
126
- local refs_subrepo_commit= # A subrepo ref -> commit last merged
127
- local refs_subrepo_fetch= # A subrepo ref -> FETCH_HEAD after fetch
128
- local refs_subrepo_push= # A subrepo ref -> branch after push
129
-
130
- local override_remote= # Remote specified with -r
131
- local override_branch= # Remote specified with -b
132
-
133
- local edit_wanted=false # Edit commit message using -e
134
- local wanted_commit_message= # Custom commit message using -m
135
- local commit_msg_file= # Custom commit message using --file
136
-
137
- local join_method= # Current join method (rebase/merge)
138
-
139
- local FAIL=true # Flag for RUN: fail on error
140
- local OUT=false # Flag for RUN: put output in $output
141
- local TTY=false # Flag for RUN: print output directly
142
- local SAY=true # Flag for RUN: print command for verbose
143
- local EXEC=false # Flag for RUN: run subprocess
144
- local OK=true # Flag that commands have succeeded
145
- local CODE=0 # Failure reason code
146
- local INDENT= # Verbose indentation
147
-
148
- local git_version= # Git version in use
149
-
150
- # Check environment and parse CLI options:
151
- assert-environment-ok
152
-
153
- # Parse and validate command options:
154
- get-command-options "$@"
155
-
156
- # Make sure repo is in the proper state:
157
- assert-repo-is-ready
158
-
159
- command-init
160
-
161
- if $all_wanted && [[ ! $command =~ ^(help|status)$ ]]; then
162
- if [[ -n $subrepo_branch ]]; then
163
- error "options --branch and --all are not compatible"
164
- fi
165
-
166
- # Run the command on all subrepos
167
- local args=( "${command_arguments[@]}" )
168
- get-all-subrepos
169
- for subdir in "${subrepos[@]}"; do
170
- command-prepare
171
- subrepo_remote=
172
- subrepo_branch=
173
- command_arguments=( "$subdir" "${args[@]}" )
174
- "command:$command"
175
- done
176
- else
177
- # Run the command on a specific subrepo
178
- command-prepare
179
- "command:$command"
180
- fi
181
- }
182
-
183
- #------------------------------------------------------------------------------
184
- # API command functions.
185
- #
186
- # Most of these commands call a subrepo:$command function to do the actual
187
- # work. The user facing output (via `say`) is done up here. The
188
- # subrepo:* worker functions are meant to be called internally and don't print
189
- # info to the user.
190
- #------------------------------------------------------------------------------
191
-
192
- # `git subrepo clone <url> [<subdir>]` command:
193
- command:clone() {
194
- command-setup +subrepo_remote subdir:guess-subdir
195
-
196
- # Clone (or reclone) the subrepo into the subdir:
197
- local reclone_up_to_date=false
198
- subrepo:clone
199
- if "$reclone_up_to_date"; then
200
- say "Subrepo '$subdir' is up to date."
201
- return
202
- fi
203
-
204
- # Successful command output:
205
- local re=
206
- $force_wanted && re=re
207
- local remote=$subrepo_remote
208
- say "Subrepo '$remote' ($subrepo_branch) ${re}cloned into '$subdir'."
209
- }
210
-
211
- # `git subrepo init <subdir>` command:
212
- command:init() {
213
- command-setup +subdir
214
- local default_branch=
215
- default_branch=$(git config init.defaultbranch)
216
- default_branch=${default_branch:=master}
217
- local remote=${subrepo_remote:=none}
218
- local branch=${subrepo_branch:=$default_branch}
219
-
220
- # Init new subrepo from the subdir:
221
- subrepo:init
222
- if OK; then
223
- if [[ $remote == none ]]; then
224
- say "Subrepo created from '$subdir' (with no remote)."
225
- else
226
- say "Subrepo created from '$subdir' with remote '$remote' ($branch)."
227
- fi
228
- else
229
- die "Unknown init error code: '$CODE'"
230
- fi
231
- return 0
232
- }
233
-
234
- # `git subrepo pull <subdir>` command:
235
- command:pull() {
236
- command-setup +subdir
237
-
238
- subrepo:pull
239
- if OK; then
240
- say "Subrepo '$subdir' pulled from '$subrepo_remote' ($subrepo_branch)."
241
- elif [[ $CODE -eq -1 ]]; then
242
- say "Subrepo '$subdir' is up to date."
243
- elif [[ $CODE -eq 1 ]]; then
244
- error-join
245
- return "$CODE"
246
- else
247
- die "Unknown pull error code: '$CODE'"
248
- fi
249
- return 0
250
- }
251
-
252
- # `git subrepo push <subdir>` command:
253
- command:push() {
254
- local branch=
255
- command-setup +subdir branch
256
-
257
- subrepo:push
258
- if OK; then
259
- say "Subrepo '$subdir' pushed to '$subrepo_remote' ($subrepo_branch)."
260
- elif [[ $CODE -eq -2 ]]; then
261
- say "Subrepo '$subdir' has no new commits to push."
262
- elif [[ $CODE -eq 1 ]]; then
263
- error-join
264
- return "$CODE"
265
- else
266
- die "Unknown push error code: '$CODE'"
267
- fi
268
- return 0
269
- }
270
-
271
- # `git subrepo fetch <subdir>` command
272
- command:fetch() {
273
- command-setup +subdir
274
- if [[ $subrepo_remote == none ]]; then
275
- say "Ignored '$subdir', no remote."
276
- else
277
- subrepo:fetch
278
- say "Fetched '$subdir' from '$subrepo_remote' ($subrepo_branch)."
279
- fi
280
- }
281
-
282
- # `git subrepo branch <subdir>` command:
283
- command:branch() {
284
- command-setup +subdir
285
- if $fetch_wanted; then
286
- CALL subrepo:fetch
287
- fi
288
-
289
- local branch=subrepo/$subref
290
- if $force_wanted; then
291
- # We must make sure that the worktree is removed as well
292
- worktree=$GIT_TMP/$branch
293
- git:delete-branch "$branch"
294
- fi
295
-
296
- if git:branch-exists "$branch"; then
297
- error "Branch '$branch' already exists. Use '--force' to override."
298
- fi
299
-
300
- # Create the subrepo branch:
301
- subrepo:branch
302
-
303
- say "Created branch '$branch' and worktree '$worktree'."
304
- }
305
-
306
- # `git subrepo commit <subdir>` command
307
- command:commit() {
308
- command-setup +subdir subrepo_commit_ref
309
-
310
- if "$fetch_wanted"; then
311
- CALL subrepo:fetch
312
- fi
313
- git:rev-exists "$refs_subrepo_fetch" ||
314
- error "Can't find ref '$refs_subrepo_fetch'. Try using -F."
315
- upstream_head_commit=$(git rev-parse "$refs_subrepo_fetch")
316
-
317
- [[ ${subrepo_commit_ref-} ]] ||
318
- subrepo_commit_ref=subrepo/$subref
319
- subrepo:commit
320
-
321
- say "Subrepo commit '$subrepo_commit_ref' committed as"
322
- say "subdir '$subdir/' to branch '$original_head_branch'."
323
- }
324
-
325
- # `git subrepo status [<subdir>]` command:
326
- command:status() {
327
- subrepo:status | ${GIT_SUBREPO_PAGER}
328
- }
329
-
330
- status-refs() {
331
- local output=
332
- while read -r line; do
333
- [[ $line =~ ^([0-9a-f]+)\ refs/subrepo/$subref/([a-z]+) ]] || continue
334
- local sha1=; sha1=$(git rev-parse --short "${BASH_REMATCH[1]}")
335
- local type=${BASH_REMATCH[2]}
336
- local ref=refs/subrepo/$subref/$type
337
- if [[ $type == branch ]]; then
338
- output+=" Branch Ref: $sha1 ($ref)"$'\n'
339
- elif [[ $type == commit ]]; then
340
- output+=" Commit Ref: $sha1 ($ref)"$'\n'
341
- elif [[ $type == fetch ]]; then
342
- output+=" Fetch Ref: $sha1 ($ref)"$'\n'
343
- elif [[ $type == pull ]]; then
344
- output+=" Pull Ref: $sha1 ($ref)"$'\n'
345
- elif [[ $type == push ]]; then
346
- output+=" Push Ref: $sha1 ($ref)"$'\n'
347
- fi
348
- done < <(git show-ref)
349
- if [[ $output ]]; then
350
- printf " Refs:\n%s" "$output"
351
- fi
352
- }
353
-
354
- # `git subrepo clean <subdir>` command
355
- command:clean() {
356
- command-setup +subdir
357
- local clean_list=()
358
- subrepo:clean
359
- for item in "${clean_list[@]}"; do
360
- say "Removed $item."
361
- done
362
- }
363
-
364
- # Wrap git config $gitrepo
365
- command:config() {
366
- command-setup +subdir +config_option config_value
367
- # shellcheck disable=2154
368
- o "Update '$subdir' configuration with $config_option=${config_value-}"
369
-
370
- if [[ ! $config_option =~ ^(branch|cmdver|commit|method|remote|version)$ ]]; then
371
- error "Option $config_option not recognized"
372
- fi
373
-
374
- if [[ -z ${config_value-} ]]; then
375
- OUT=true RUN git config --file="$gitrepo" "subrepo.$config_option"
376
- say "Subrepo '$subdir' option '$config_option' has value '$output'."
377
- return
378
- fi
379
-
380
- if ! $force_wanted; then
381
- # Only allow changing method without force
382
- if [[ $config_option != method ]]; then
383
- error "This option is autogenerated, use '--force' to override."
384
- fi
385
- fi
386
-
387
- if [[ $config_option == method ]]; then
388
- if [[ ! $config_value =~ ^(merge|rebase)$ ]]; then
389
- error "Not a valid method. Valid options are 'merge' or 'rebase'."
390
- fi
391
- fi
392
-
393
- RUN git config --file="$gitrepo" "subrepo.$config_option" "$config_value"
394
- say "Subrepo '$subdir' option '$config_option' set to '$config_value'."
395
- }
396
-
397
-
398
- # Launch the manpage viewer:
399
- command:help() {
400
- source "${SOURCE_DIR}/git-subrepo.d/help-functions.bash"
401
- local cmd=${command_arguments[0]}
402
- if [[ $cmd ]]; then
403
- if can "help:$cmd"; then
404
- "help:$cmd"
405
- echo
406
- else
407
- err "No help found for '$cmd'"
408
- fi
409
- elif $all_wanted; then
410
- help:all
411
- else
412
- exec git help subrepo
413
- fi
414
- msg_ok=0
415
- }
416
-
417
- # Print version info.
418
- # TODO: Add short commit id after version.
419
- # Will need to get it from repo or make install can put it somewhere.
420
- command:version() {
421
- cat <<...
422
- git-subrepo Version: $VERSION
423
- Copyright 2013-2020 Ingy döt Net
424
- https://github.com/ingydotnet/git-subrepo
425
- ${BASH_SOURCE[0]}
426
- Git Version: $git_version
427
-
428
- ...
429
- :
430
- }
431
-
432
- command:upgrade() {
433
- local path=$0
434
- if [[ $path =~ ^/ && $path =~ ^(.*/git-subrepo)/lib/git-subrepo$ ]]; then
435
- local subrepo_root=${BASH_REMATCH[1]}
436
- (
437
- o "Change directory to '$subrepo_root'."
438
- cd "${BASH_REMATCH[1]}"
439
-
440
- branch_name=$(git rev-parse --abbrev-ref HEAD)
441
- if [[ $branch_name != master ]]; then
442
- error "git-subrepo repo is not on the 'master' branch"
443
- fi
444
-
445
- o "'git pull' latest version."
446
- RUN git pull --ff-only
447
-
448
- say "git-subrepo is up to date."
449
- )
450
- else
451
- die "\
452
-
453
- Sorry. Your installation can't use the 'git subrepo upgrade' command. The
454
- command only works if you installed git subrepo by adding
455
- '/path/to/git-subrepo' to your PATH.
456
-
457
- If you used 'make install' to install git-subrepo, then just do this:
458
-
459
- cd /path/to/git-subrepo
460
- git pull
461
- make install
462
-
463
- "
464
- fi
465
- }
466
-
467
- #------------------------------------------------------------------------------
468
- # Subrepo command worker functions.
469
- #------------------------------------------------------------------------------
470
-
471
- # Clone by fetching remote content into our subdir:
472
- subrepo:clone() {
473
- FAIL=false RUN git rev-parse HEAD
474
- if ! OK; then
475
- error "You can't clone into an empty repository"
476
- fi
477
-
478
- # Turn off force unless really a reclone:
479
- if $force_wanted && [[ ! -f $gitrepo ]]; then
480
- force_wanted=false
481
- fi
482
-
483
- if $force_wanted; then
484
- o "--force indicates a reclone."
485
- CALL subrepo:fetch
486
- read-gitrepo-file
487
- o "Check if we already are up to date."
488
- if [[ $upstream_head_commit == "$subrepo_commit" ]]; then
489
- reclone_up_to_date=true
490
- return
491
- fi
492
- o "Remove the old subdir."
493
- RUN git rm -r -- "$subdir"
494
-
495
- if [[ -z $override_branch ]]; then
496
- o "Determine the upstream head branch."
497
- get-upstream-head-branch
498
- subrepo_branch="$output"
499
- override_branch="$output" # Force update of the branch in .gitrepo
500
- fi
501
- else
502
- assert-subdir-empty
503
- if [[ -z $subrepo_branch ]]; then
504
- o "Determine the upstream head branch."
505
- get-upstream-head-branch
506
- subrepo_branch=$output
507
- fi
508
-
509
- CALL subrepo:fetch
510
- fi
511
-
512
- o "Make the directory '$subdir/' for the clone."
513
- RUN mkdir -p -- "$subdir"
514
-
515
- o "Commit the new '$subdir/' content."
516
- subrepo_commit_ref=$upstream_head_commit
517
- CALL subrepo:commit
518
- }
519
-
520
- # Init a new subrepo from current repo:
521
- subrepo:init() {
522
- local branch_name=subrepo/${subref:??}
523
- # Check if subdir is proper candidate for this init:
524
- assert-subdir-ready-for-init
525
-
526
- o "Put info into '$subdir/.gitrepo' file."
527
- update-gitrepo-file
528
-
529
- o "Add the new '$subdir/.gitrepo' file."
530
- # -f from pull request #219. TODO needs test.
531
- RUN git add -f -- "$gitrepo"
532
-
533
- o "Commit new subrepo to the '$original_head_branch' branch."
534
- subrepo_commit_ref=$original_head_commit
535
- RUN git commit -m "$(get-commit-message)"
536
-
537
- o "Create ref '$refs_subrepo_commit'."
538
- git:make-ref "$refs_subrepo_commit" "$subrepo_commit_ref"
539
- }
540
-
541
- # Properly merge a local subrepo branch with upstream and commit to mainline:
542
- subrepo:pull() {
543
- CALL subrepo:fetch
544
-
545
- # If forced pull, then clone instead
546
- if $force_wanted; then
547
- CALL subrepo:clone
548
- return
549
- fi
550
-
551
- # Check if we already are up to date
552
- # If the -u flag is present, always perform the operation
553
- if [[ $upstream_head_commit == "$subrepo_commit" ]] && ! $update_wanted; then
554
- OK=false; CODE=-1; return
555
- fi
556
-
557
- local branch_name=subrepo/$subref
558
- git:delete-branch "$branch_name"
559
-
560
- subrepo_commit_ref=$branch_name
561
-
562
- o "Create subrepo branch '$branch_name'."
563
- CALL subrepo:branch
564
- cd "$worktree";
565
-
566
- if [[ $join_method == rebase ]]; then
567
- o "Rebase changes to $refs_subrepo_fetch"
568
- FAIL=false OUT=true RUN git rebase "$refs_subrepo_fetch" "$branch_name"
569
- if ! OK; then
570
- say "The \"git rebase\" command failed:"
571
- say
572
- say " ${output//$'\n'/$'\n' }"
573
- CODE=1
574
- return
575
- fi
576
- else
577
- o "Merge in changes from $refs_subrepo_fetch"
578
- FAIL=false RUN git merge "$refs_subrepo_fetch"
579
- if ! OK; then
580
- say "The \"git merge\" command failed:"
581
- say
582
- say " ${output//$'\n'/$'\n' }"
583
- CODE=1
584
- return
585
- fi
586
- fi
587
-
588
- o "Back to $start_pwd"
589
- cd "$start_pwd";
590
-
591
- o "Create ref '$refs_subrepo_branch' for branch '$branch_name'."
592
- git:make-ref "$refs_subrepo_branch" "$branch_name"
593
-
594
- o "Commit the new '$subrepo_commit_ref' content."
595
- CALL subrepo:commit
596
- }
597
-
598
- # Push a properly merged subrepo branch upstream:
599
- subrepo:push() {
600
- local branch_name=$branch
601
- local new_upstream=false
602
- local branch_created=false
603
-
604
- if [[ -z $branch_name ]]; then
605
- FAIL=false OUT=false CALL subrepo:fetch
606
-
607
- if ! OK; then
608
- # Check if we are pushing to a new upstream repo (or branch) and just
609
- # push the commit directly. This is common after a `git subrepo init`:
610
- # Force to case in
611
- local re="(^|"$'\n'")fatal: couldn't find remote ref "
612
- if [[ ${output,,} =~ $re ]]; then
613
- o "Pushing to new upstream: $subrepo_remote ($subrepo_branch)."
614
- new_upstream=true
615
- else
616
- error "Fetch for push failed: $output"
617
- fi
618
- else
619
- # Check that we are up to date:
620
- o "Check upstream head against .gitrepo commit."
621
- if ! $force_wanted; then
622
- if [[ $upstream_head_commit != "$subrepo_commit" ]]; then
623
- error "There are new changes upstream, you need to pull first."
624
- fi
625
- fi
626
- fi
627
-
628
- branch_name=subrepo/$subref
629
- # We must make sure that a stale worktree is removed as well
630
- worktree=$GIT_TMP/$branch_name
631
- git:delete-branch "$branch_name"
632
-
633
- if $squash_wanted; then
634
- o "Squash commits"
635
- subrepo_parent=HEAD^
636
- fi
637
-
638
- o "Create subrepo branch '$branch_name'."
639
- CALL subrepo:branch "$branch_name"
640
- cd "$worktree";
641
-
642
- if [[ $join_method == rebase ]]; then
643
- o "Rebase changes to $refs_subrepo_fetch"
644
- FAIL=false OUT=true RUN git rebase "$refs_subrepo_fetch" "$branch_name"
645
- if ! OK; then
646
- say "The \"git rebase\" command failed:"
647
- say
648
- say " ${output//$'\n'/$'\n' }"
649
- CODE=1
650
- return
651
- fi
652
- fi
653
- branch_created=true
654
- cd "$start_pwd"
655
- else
656
- if $squash_wanted; then
657
- error "Squash option (-s) can't be used with branch parameter"
658
- fi
659
- fi
660
-
661
- o "Make sure that '$branch_name' exists."
662
- git:branch-exists "$branch_name" ||
663
- error "No subrepo branch '$branch_name' to push."
664
-
665
- o "Check if we have something to push"
666
- new_upstream_head_commit=$(git rev-parse "$branch_name")
667
- if ! $new_upstream; then
668
- if [[ $upstream_head_commit == "$new_upstream_head_commit" ]]; then
669
- if $branch_created; then
670
- o "Remove branch '$branch_name'."
671
- git:delete-branch "$branch_name"
672
- fi
673
- OK=false
674
- CODE=-2
675
- return
676
- fi
677
- fi
678
-
679
- if ! $force_wanted; then
680
- o "Make sure '$branch_name' contains the '$refs_subrepo_fetch' HEAD."
681
- if ! git:commit-in-rev-list "$upstream_head_commit" "$branch_name"; then
682
- error "Can't commit: '$branch_name' doesn't contain upstream HEAD: " \
683
- "$upstream_head_commit"
684
- fi
685
- fi
686
-
687
- local force=''
688
- "$force_wanted" && force=' --force'
689
-
690
- o "Push$force branch '$branch_name' to '$subrepo_remote' ($subrepo_branch)."
691
- # shellcheck disable=2086
692
- RUN git push$force "$subrepo_remote" "$branch_name":"$subrepo_branch"
693
-
694
- o "Create ref '$refs_subrepo_push' for branch '$branch_name'."
695
- git:make-ref "$refs_subrepo_push" "$branch_name"
696
-
697
- if $branch_created; then
698
- o "Remove branch '$branch_name'."
699
- git:delete-branch "$branch_name"
700
- fi
701
-
702
- o "Put updates into '$subdir/.gitrepo' file."
703
- upstream_head_commit=$new_upstream_head_commit
704
- subrepo_commit_ref=$upstream_head_commit
705
- update-gitrepo-file
706
-
707
- local commit_message
708
- if [[ $wanted_commit_message ]]; then
709
- commit_message=$wanted_commit_message
710
- else
711
- commit_message=$(get-commit-message)
712
- fi
713
-
714
- if [[ $commit_msg_file ]]; then
715
- RUN git command --file "$commit_msg_file"
716
- else
717
- RUN git commit -m "$commit_message"
718
- fi
719
- }
720
-
721
- # Fetch the subrepo's remote branch content:
722
- subrepo:fetch() {
723
- if [[ $subrepo_remote == none ]]; then
724
- error "Can't fetch subrepo. Remote is 'none' in '$subdir/.gitrepo'."
725
- fi
726
-
727
- o "Fetch the upstream: $subrepo_remote ($subrepo_branch)."
728
- RUN git fetch --no-tags --quiet "$subrepo_remote" "$subrepo_branch"
729
- OK || return
730
-
731
- o "Get the upstream subrepo HEAD commit."
732
- OUT=true RUN git rev-parse FETCH_HEAD^0
733
- upstream_head_commit=$output
734
-
735
- o "Create ref '$refs_subrepo_fetch'."
736
- git:make-ref "$refs_subrepo_fetch" FETCH_HEAD^0
737
- }
738
-
739
- # Create a subrepo branch containing all changes
740
- # shellcheck disable=2120
741
- subrepo:branch() {
742
- local branch=${1:-"subrepo/$subref"}
743
- o "Check if the '$branch' branch already exists."
744
- git:branch-exists "$branch" && return
745
-
746
- local last_gitrepo_commit=
747
- local first_gitrepo_commit=
748
-
749
- o "Subrepo parent: $subrepo_parent"
750
-
751
- if [[ $subrepo_parent ]]; then
752
-
753
- # Check if the subrepo parent is an ancestor of HEAD.
754
- # For example rebasing the commit that touched the subrepo
755
- # could make the commit no longer match.
756
- local parent_is_ancestor=
757
- git merge-base --is-ancestor "$subrepo_parent" HEAD && parent_is_ancestor="true"
758
- if [[ -z "$parent_is_ancestor" ]]; then
759
- local prev_merge_point
760
- prev_merge_point=$(git log -1 -G "commit =" --format="%H" "$gitrepo")
761
- # We want the SHA of the patch before the sync point just in case someone made a modifcation in the
762
- # actual sync commit
763
- prev_merge_point=$(git log -1 --format="%H" "$prev_merge_point"^)
764
- error "The last sync point (where upstream and the subrepo were equal) is not an ancestor. \n \
765
- This is usually caused by a rebase affecting that commit. \n \
766
- To recover set the subrepo parent in '$gitrepo'\n \
767
- to '$prev_merge_point' \n \
768
- and validate the subrepo by comparing with 'git subrepo branch $subdir'"
769
- fi
770
-
771
- local prev_commit=
772
- local ancestor=
773
- o "Create new commits with parents into the subrepo fetch"
774
- OUT=true RUN git rev-list --reverse --ancestry-path --topo-order "$subrepo_parent..HEAD"
775
- local commit_list=$output
776
- for commit in $commit_list; do
777
- o "Working on $commit"
778
-
779
- FAIL=false OUT=true RUN git config --blob \
780
- "$commit:$subdir/.gitrepo" "subrepo.commit"
781
- if [[ -z $output ]]; then
782
- o "Ignore commit, no .gitrepo file"
783
- continue
784
- fi
785
-
786
- local gitrepo_commit=$output
787
- o ".gitrepo reference commit: $gitrepo_commit"
788
-
789
-
790
- # Only include the commit if it's a child of the previous commit
791
- # This way we create a single path between $subrepo_parent..HEAD
792
- if [[ $ancestor ]]; then
793
- local is_direct_child
794
- is_direct_child=$(
795
- git show -s --pretty=format:"%P" "$commit" |
796
- grep "$ancestor"
797
- ) || true
798
- o "is child: $is_direct_child"
799
- if [[ -z $is_direct_child ]]; then
800
- o "Ignore $commit, it's not in the selected path"
801
- continue
802
- fi
803
- fi
804
-
805
- # Remember the previous commit from the parent repo path
806
- ancestor=$commit
807
-
808
- o "Check for rebase"
809
- if git:rev-exists "$refs_subrepo_fetch"; then
810
- if ! git:commit-in-rev-list "$gitrepo_commit" "$refs_subrepo_fetch"; then
811
- error "Local repository does not contain $gitrepo_commit. Try to 'git subrepo fetch $subref' or add the '-F' flag to always fetch the latest content."
812
- fi
813
- fi
814
-
815
- o "Find parents"
816
- local first_parent second_parent
817
- first_parent=()
818
- [[ $prev_commit ]] && first_parent=(-p "$prev_commit")
819
- second_parent=()
820
- if [[ -z $first_gitrepo_commit ]]; then
821
- first_gitrepo_commit=$gitrepo_commit
822
- second_parent=(-p "$gitrepo_commit")
823
- fi
824
-
825
- if [[ $join_method != rebase ]]; then
826
- # In the rebase case we don't create merge commits
827
- if [[ $gitrepo_commit != "$last_gitrepo_commit" ]]; then
828
- second_parent=(-p "$gitrepo_commit")
829
- last_gitrepo_commit=$gitrepo_commit
830
- fi
831
- fi
832
-
833
- o "Create a new commit ${first_parent[*]} ${second_parent[*]}"
834
- FAIL=false RUN git cat-file -e "$commit":"$subdir"
835
- if OK; then
836
- o "Create with content"
837
- local PREVIOUS_IFS=$IFS
838
- IFS=$'\n'
839
- local author_info
840
- mapfile -t author_info < <(git log -1 --date=default --format=%ad%n%ae%n%an "$commit")
841
- local commiter_info
842
- mapfile -t commiter_info < <(git log -1 --date=default --format=%cd%n%ce%n%cn "$commit")
843
- IFS=$PREVIOUS_IFS
844
-
845
- # When we create new commits we leave the author information unchanged
846
- # the committer will though be updated to the current user
847
- # This should be analog how cherrypicking is handled allowing git
848
- # to store both the original author but also the responsible committer
849
- # that created the local version of the commit and pushed it.
850
- prev_commit=$(git log -n 1 --date=default --format=%B "$commit" |
851
- GIT_AUTHOR_DATE=${author_info[0]} \
852
- GIT_AUTHOR_EMAIL=${author_info[1]} \
853
- GIT_AUTHOR_NAME=${author_info[2]} \
854
- GIT_COMMITTER_DATE="${commiter_info[0]}" \
855
- GIT_COMMITTER_EMAIL="${commiter_info[1]}" \
856
- GIT_COMMITTER_NAME="${commiter_info[2]}" \
857
- git commit-tree -F - "${first_parent[@]}" "${second_parent[@]}" "$commit":"$subdir")
858
- else
859
- o "Create empty placeholder"
860
- prev_commit=$(git commit-tree -m "EMPTY" \
861
- "${first_parent[*]}" "${second_parent[*]}" "4b825dc642cb6eb9a060e54bf8d69288fbee4904")
862
- fi
863
- done
864
-
865
- o "Create branch '$branch' for this new commit set $prev_commit."
866
- RUN git branch "$branch" "$prev_commit"
867
- else
868
- o "No parent setting, use the subdir content."
869
- RUN git branch "$branch" HEAD
870
- TTY=true FAIL=false RUN git filter-branch -f --subdirectory-filter \
871
- "$subref" "$branch"
872
- fi
873
-
874
- o "Remove the .gitrepo file from $first_gitrepo_commit..$branch"
875
- local filter=$branch
876
- [[ $first_gitrepo_commit ]] && filter=$first_gitrepo_commit..$branch
877
- FAIL=false RUN git filter-branch -f --prune-empty --tree-filter \
878
- "rm -f .gitrepo" "$filter"
879
-
880
- git:create-worktree "$branch"
881
-
882
- o "Create ref '$refs_subrepo_branch'."
883
- git:make-ref "$refs_subrepo_branch" "$branch"
884
- }
885
-
886
- # Commit a merged subrepo branch:
887
- subrepo:commit() {
888
- o "Check that '$subrepo_commit_ref' exists."
889
- git:rev-exists "$subrepo_commit_ref" ||
890
- error "Commit ref '$subrepo_commit_ref' does not exist."
891
-
892
- if ! "$force_wanted"; then
893
- local upstream=$upstream_head_commit
894
- o "Make sure '$subrepo_commit_ref' contains the upstream HEAD."
895
- if ! git:commit-in-rev-list "$upstream" "$subrepo_commit_ref"; then
896
- error \
897
- "Can't commit: '$subrepo_commit_ref' doesn't contain upstream HEAD."
898
- fi
899
- fi
900
-
901
- if git ls-files -- "$subdir" | grep -q .; then
902
- o "Remove old content of the subdir."
903
- RUN git rm -r -- "$subdir"
904
- fi
905
-
906
- o "Put remote subrepo content into '$subdir/'."
907
- RUN git read-tree --prefix="$subdir" -u "$subrepo_commit_ref"
908
-
909
- o "Put info into '$subdir/.gitrepo' file."
910
- update-gitrepo-file
911
- RUN git add -f -- "$gitrepo"
912
-
913
- local commit_message
914
- if [[ $wanted_commit_message ]]; then
915
- commit_message=$wanted_commit_message
916
- else
917
- commit_message=$(get-commit-message)
918
- fi
919
-
920
- local edit_flag=
921
- $edit_wanted && edit_flag=--edit
922
-
923
- [[ $commit_message ]] || commit_message=$(get-commit-message)
924
-
925
- local edit_flag=
926
- $edit_wanted && edit_flag=--edit
927
-
928
- o "Commit to the '$original_head_branch' branch."
929
- if [[ $original_head_commit != none ]]; then
930
- if [[ $commit_msg_file ]]; then
931
- RUN git commit $edit_flag --file "$commit_msg_file"
932
- else
933
- RUN git commit $edit_flag -m "$commit_message"
934
- fi
935
- else
936
- # We had cloned into an empty repo, side effect of prior git reset --mixed
937
- # command is that subrepo's history is now part of the index. Commit
938
- # without that history.
939
- OUT=true RUN git write-tree
940
- if [[ $commit_msg_file ]]; then
941
- OUT=true RUN git commit-tree $edit_flag --file "$commit_msg_file" "$output"
942
- else
943
- OUT=true RUN git commit-tree $edit_flag -m "$commit_message" "$output"
944
- fi
945
- RUN git reset --hard "$output"
946
- fi
947
-
948
- # Clean up worktree to indicate that we are ready
949
- git:remove-worktree
950
-
951
- o "Create ref '$refs_subrepo_commit'."
952
- git:make-ref "$refs_subrepo_commit" "$subrepo_commit_ref"
953
- }
954
-
955
- subrepo:status() {
956
- if [[ ${#command_arguments[@]} -eq 0 ]]; then
957
- get-all-subrepos
958
- local count=${#subrepos[@]}
959
- if ! "$quiet_wanted"; then
960
- if [[ $count -eq 0 ]]; then
961
- echo "No subrepos."
962
- return
963
- else
964
- local s=; [[ $count -eq 1 ]] || s=s
965
- echo "$count subrepo$s:"
966
- echo
967
- fi
968
- fi
969
- else
970
- subrepos=("${command_arguments[@]}")
971
- fi
972
-
973
- for subdir in "${subrepos[@]}"; do
974
- check-and-normalize-subdir
975
- encode-subdir
976
-
977
- if [[ ! -f $subdir/.gitrepo ]]; then
978
- echo "'$subdir' is not a subrepo"
979
- echo
980
- continue
981
- fi
982
-
983
- refs_subrepo_fetch=refs/subrepo/$subref/fetch
984
- upstream_head_commit=$(
985
- git rev-parse --short "$refs_subrepo_fetch" 2> /dev/null || true
986
- )
987
- subrepo_remote=
988
- subrepo_branch=
989
-
990
- read-gitrepo-file
991
- if $fetch_wanted; then
992
- subrepo:fetch
993
- fi
994
-
995
- if $quiet_wanted; then
996
- echo "$subdir"
997
- continue
998
- fi
999
-
1000
- echo "Git subrepo '$subdir':"
1001
- git:branch-exists "subrepo/$subref" &&
1002
- echo " Subrepo Branch: subrepo/$subref"
1003
- local remote=subrepo/$subref
1004
- FAIL=false OUT=true RUN git config "remote.$remote.url"
1005
- [[ $output ]] &&
1006
- echo " Remote Name: subrepo/$subref"
1007
- echo " Remote URL: $subrepo_remote"
1008
- [[ $upstream_head_commit ]] &&
1009
- echo " Upstream Ref: $upstream_head_commit"
1010
- echo " Tracking Branch: $subrepo_branch"
1011
- [[ -z $subrepo_commit ]] ||
1012
- echo " Pulled Commit: $(git rev-parse --short "$subrepo_commit")"
1013
- if [[ $subrepo_parent ]]; then
1014
- echo " Pull Parent: $(git rev-parse --short "$subrepo_parent")"
1015
- # TODO Remove this eventually:
1016
- elif [[ $subrepo_former ]]; then
1017
- printf " Former Commit: %s" "$(git rev-parse --short "$subrepo_former")"
1018
- echo " *** DEPRECATED ***"
1019
- fi
1020
-
1021
- # Grep for directory, branch can be in detached state due to conflicts
1022
- local _worktree
1023
- _worktree=$(
1024
- git worktree list |
1025
- grep "$GIT_TMP/subrepo/$subdir "
1026
- ) || true
1027
- if [[ $_worktree ]]; then
1028
- echo " Worktree: $_worktree"
1029
- fi
1030
-
1031
- if "$verbose_wanted"; then
1032
- status-refs
1033
- fi
1034
-
1035
- echo
1036
- done
1037
- }
1038
-
1039
- subrepo:clean() {
1040
- # Remove subrepo branches if exist:
1041
- local branch=subrepo/$subref
1042
- local ref=refs/heads/$branch
1043
- local worktree=$GIT_TMP/$branch
1044
-
1045
- o "Clean $subdir"
1046
- git:remove-worktree
1047
- if git:branch-exists "$branch"; then
1048
- o "Remove branch '$branch'."
1049
- RUN git update-ref -d "$ref"
1050
- clean_list+=("branch '$branch'")
1051
- fi
1052
-
1053
- if "$force_wanted"; then
1054
- o "Remove all subrepo refs."
1055
- local suffix=''
1056
- if ! $all_wanted; then
1057
- suffix=$subref/
1058
- fi
1059
- git show-ref | while read -r hash ref; do
1060
- if [[ $ref == "refs/subrepo/$suffix"* ]]; then
1061
- git update-ref -d "$ref"
1062
- fi
1063
- done
1064
- git show-ref | while read -r hash ref; do
1065
- if [[ $ref == "refs/original/refs/heads/subrepo/$suffix"* ]]; then
1066
- git update-ref -d "$ref"
1067
- fi
1068
- done
1069
- fi
1070
- }
1071
-
1072
- #------------------------------------------------------------------------------
1073
- # Support functions:
1074
- #------------------------------------------------------------------------------
1075
-
1076
-
1077
- # TODO:
1078
- # Collect original options and arguments into an array for commit message
1079
- # They should be normalized and pruned
1080
-
1081
- # Parse command line options:
1082
- get-command-options() {
1083
- [[ $# -eq 0 ]] && set -- --help
1084
-
1085
- [[ ${GIT_SUBREPO_QUIET-} ]] && quiet_wanted=true
1086
- [[ ${GIT_SUBREPO_VERBOSE-} ]] && verbose_wanted=true
1087
- [[ ${GIT_SUBREPO_DEBUG-} ]] && debug_wanted=true
1088
-
1089
- eval "$(
1090
- echo "$GETOPT_SPEC" |
1091
- git rev-parse --parseopt -- "$@" ||
1092
- echo exit $?
1093
- )"
1094
-
1095
- while [[ $# -gt 0 ]]; do
1096
- local option=$1; shift
1097
- case "$option" in
1098
- --) break ;;
1099
- -a) all_wanted=true ;;
1100
- -A) ALL_wanted=true
1101
- all_wanted=true ;;
1102
- -b) subrepo_branch=$1
1103
- override_branch=$1
1104
- commit_msg_args+=("--branch=$1")
1105
- shift ;;
1106
- -e) edit_wanted=true ;;
1107
- -f) force_wanted=true
1108
- commit_msg_args+=("--force") ;;
1109
- -F) fetch_wanted=true ;;
1110
- -m)
1111
- if [[ $commit_msg_file ]]; then
1112
- error "fatal: options '-m' and '--file' cannot be used together"
1113
- fi
1114
- wanted_commit_message=$1
1115
- shift;;
1116
- -M) join_method=$1
1117
- shift;;
1118
- -r) subrepo_remote=$1
1119
- override_remote=$1
1120
- commit_msg_args+=("--remote=$1")
1121
- shift ;;
1122
- -s) squash_wanted=true ;;
1123
- -u) update_wanted=true
1124
- commit_msg_args+=("--update") ;;
1125
- -q) quiet_wanted=true ;;
1126
- -v) verbose_wanted=true ;;
1127
- -d) debug_wanted=true ;;
1128
- -x) set -x ;;
1129
- --file)
1130
- if [[ $wanted_commit_message ]]; then
1131
- error "fatal: options '-m' and '--file' cannot be used together"
1132
- fi
1133
- if [ -f "$1" ]; then
1134
- commit_msg_file="$1"
1135
- else
1136
- error "Commit msg file at $1 not found"
1137
- fi
1138
- shift ;;
1139
- --version)
1140
- echo "$VERSION"
1141
- exit ;;
1142
- *) usage-error "Unexpected option: '$option'." ;;
1143
- esac
1144
- done
1145
-
1146
- # Set subrepo command:
1147
- command=$1; shift
1148
-
1149
- # Make sure command exists:
1150
- can "command:$command" ||
1151
- usage-error "'$command' is not a command. See 'git subrepo help'."
1152
-
1153
- command_arguments=("$@")
1154
- if [[ ${command_arguments[*]-} && ${#command_arguments[@]} -gt 0 ]]; then
1155
- local first=${command_arguments[0]}
1156
- first=${first%/}
1157
- command_arguments[0]=$first
1158
- fi
1159
- commit_msg_args+=("${command_arguments[@]}")
1160
-
1161
- for option in all ALL edit fetch force squash; do
1162
- var=${option}_wanted
1163
- if ${!var}; then
1164
- check_option $option
1165
- fi
1166
- done
1167
-
1168
- if [[ $override_branch ]]; then
1169
- check_option branch
1170
- fi
1171
- if [[ $override_remote ]]; then
1172
- check_option remote
1173
- fi
1174
- if [[ $wanted_commit_message || $commit_msg_file ]]; then
1175
- check_option message
1176
- fi
1177
- if $update_wanted; then
1178
- check_option update
1179
- if [[ -z $subrepo_branch && -z $subrepo_remote ]]; then
1180
- usage-error "Can't use '--update' without '--branch' or '--remote'."
1181
- fi
1182
- fi
1183
- }
1184
-
1185
- options_help='all'
1186
- options_branch='all fetch force'
1187
- options_clean='ALL all force'
1188
- options_clone='branch edit force message method'
1189
- options_config='force'
1190
- options_commit='edit fetch force message'
1191
- options_fetch='all branch force remote'
1192
- options_init='branch remote method'
1193
- options_pull='all branch edit force message remote update'
1194
- options_push='all branch force message remote squash update'
1195
- options_status='ALL all fetch'
1196
- check_option() {
1197
- local var=options_${command//-/_}
1198
- [[ ${!var} =~ $1 ]] ||
1199
- usage-error "Invalid option '--$1' for '$command'."
1200
- }
1201
-
1202
- #------------------------------------------------------------------------------
1203
- # Command argument validation:
1204
- #------------------------------------------------------------------------------
1205
-
1206
- command-init() {
1207
- # Export variable to let other processes (possibly git hooks) know that they
1208
- # are running under git-subrepo. Set to current process pid, so it can be
1209
- # further verified if need be:
1210
- export GIT_SUBREPO_RUNNING=$$
1211
- export GIT_SUBREPO_COMMAND=$command
1212
-
1213
- : "${GIT_SUBREPO_PAGER:=${PAGER:-less}}"
1214
- if [[ $GIT_SUBREPO_PAGER == less ]]; then
1215
- GIT_SUBREPO_PAGER='less -FRX'
1216
- fi
1217
- }
1218
-
1219
- command-prepare() {
1220
- local output=
1221
- if git:rev-exists HEAD; then
1222
- git:get-head-branch-commit
1223
- fi
1224
- original_head_commit=${output:-none}
1225
- }
1226
-
1227
- # Do the setup steps needed by most of the subrepo subcommands:
1228
- command-setup() {
1229
- get-params "$@"
1230
-
1231
- check-and-normalize-subdir
1232
- encode-subdir
1233
- gitrepo=$subdir/.gitrepo
1234
-
1235
- if ! $force_wanted; then
1236
- o "Check for worktree with branch subrepo/$subdir"
1237
- local _worktree
1238
- _worktree=$(
1239
- git worktree list |
1240
- grep "\[subrepo/$subdir\]" |
1241
- cut -d ' ' -f1
1242
- ) || true
1243
- if [[ $command =~ ^(commit)$ && -z $_worktree ]]; then
1244
- error "There is no worktree available, use the branch command first"
1245
- elif [[ ! $command =~ ^(branch|clean|commit|push)$ && $_worktree ]]; then
1246
- if [[ -e $gitrepo ]]; then
1247
- error "There is already a worktree with branch subrepo/$subdir.
1248
- Use the --force flag to override this check or perform a subrepo clean
1249
- to remove the worktree."
1250
- else
1251
- error "There is already a worktree with branch subrepo/$subdir.
1252
- Use the --force flag to override this check or remove the worktree with
1253
- 1. rm -rf $_worktree
1254
- 2. git worktree prune
1255
- "
1256
- fi
1257
- fi
1258
- fi
1259
-
1260
- # Set refs_ variables:
1261
- refs_subrepo_branch=refs/subrepo/$subref/branch
1262
- refs_subrepo_commit=refs/subrepo/$subref/commit
1263
- refs_subrepo_fetch=refs/subrepo/$subref/fetch
1264
- refs_subrepo_push=refs/subrepo/$subref/push
1265
-
1266
- # Read/parse the .gitrepo file (unless clone/init; doesn't exist yet)
1267
- if [[ ! $command =~ ^(clone|init)$ ]]; then
1268
- read-gitrepo-file
1269
- fi
1270
-
1271
- true
1272
- }
1273
-
1274
- # Parse command line args according to a simple dsl spec:
1275
- # shellcheck disable=2059
1276
- get-params() {
1277
- local i=0
1278
- local num=${#command_arguments[@]}
1279
- for arg in "$@"; do
1280
- local value=${command_arguments[i]-}
1281
- value=${value//%/%%}
1282
- value=${value//\\/\\\\}
1283
- # If arg starts with '+' then it is required
1284
- if [[ $arg == +* ]]; then
1285
- if [[ $i -ge $num ]]; then
1286
- usage-error "Command '$command' requires arg '${arg#+}'."
1287
- fi
1288
- printf -v "${arg#+}" -- "$value"
1289
- # Look for function name after ':' to provide a default value
1290
- else
1291
- if [[ $i -lt $num ]]; then
1292
- printf -v "${arg%:*}" -- "$value"
1293
- elif [[ $arg =~ : ]]; then
1294
- "${arg#*:}"
1295
- fi
1296
- fi
1297
- : $((i++))
1298
- done
1299
-
1300
- # Check for extra arguments:
1301
- if [[ $num -gt $i ]]; then
1302
- set -- "${command_arguments[@]}"
1303
- for ((j = 1; j <= i; j++)); do shift; done
1304
- error "Unknown argument(s) '$*' for '$command' command."
1305
- fi
1306
- }
1307
-
1308
- check-and-normalize-subdir() {
1309
- # Sanity check subdir:
1310
- [[ $subdir ]] ||
1311
- die "subdir not set"
1312
- [[ $subdir =~ ^/ || $subdir =~ ^[A-Z]: ]] &&
1313
- usage-error "The subdir '$subdir' should not be absolute path."
1314
- subdir=${subdir#./}
1315
- subdir=${subdir%/}
1316
- [[ $subdir != *//* ]] || subdir=$(tr -s / <<< "$subdir")
1317
- }
1318
-
1319
- # Determine the correct subdir path to use:
1320
- guess-subdir() {
1321
- local dir=$subrepo_remote
1322
- dir=${dir%.git}
1323
- dir=${dir%/}
1324
- dir=${dir##*/}
1325
- [[ $dir =~ ^[-_a-zA-Z0-9]+$ ]] ||
1326
- error "Can't determine subdir from '$subrepo_remote'."
1327
- subdir=$dir
1328
- check-and-normalize-subdir
1329
- encode-subdir
1330
- }
1331
-
1332
- # Encode the subdir as a valid git ref format
1333
- #
1334
- # Input: env $subdir
1335
- # Output: env $subref
1336
- #
1337
- # For detail rules about valid git refs, see the manual of git-check-ref-format:
1338
- # URL: https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html
1339
- # Shell: git check-ref-format --help
1340
- #
1341
- encode-subdir() {
1342
- subref=$subdir
1343
- if [[ ! $subref ]] || git check-ref-format "subrepo/$subref"; then
1344
- return
1345
- fi
1346
-
1347
- ## 0. escape %, ensure the subref can be (almost) decoded back to subdir
1348
- subref=${subref//%/%25}
1349
-
1350
- ## 1. They can include slash / for hierarchical (directory) grouping,
1351
- ## but no slash-separated component can begin with a dot . or
1352
- ## end with the sequence .lock.
1353
- subref=/$subref/
1354
- subref=${subref//\/.//%2e}
1355
- subref=${subref//.lock\//%2elock/}
1356
- subref=${subref#/}
1357
- subref=${subref%/}
1358
-
1359
- ## 2. They must contain at least one /.
1360
- ## Note: 'subrepo/' be will prefixed, so this is always true.
1361
- ## 3. They cannot have two consecutive dots .. anywhere.
1362
- subref=${subref//../%2e%2e}
1363
- subref=${subref//%2e./%2e%2e}
1364
- subref=${subref//.%2e/%2e%2e}
1365
-
1366
- ## 4. They cannot have ASCII control characters
1367
- ## (i.e. bytes whose values are lower than \040, or \177 DEL), space,
1368
- ## tilde ~, caret ^, or colon : anywhere.
1369
- ## 5. They cannot have question-mark ?, asterisk *,
1370
- ## or open bracket [ anywhere.
1371
- local i
1372
- for (( i = 1; i < 32; ++i )); do
1373
- # skip substitute NUL char (i=0), as bash will skip NUL in env
1374
- local x
1375
- x=$(printf "%02x" "$i")
1376
- subref=${subref//$(printf "%b" "\x$x")/%$x}
1377
- done
1378
- subref=${subref//$'\177'/%7f}
1379
- subref=${subref// /%20}
1380
- subref=${subref//\~/%7e}
1381
- subref=${subref//^/%5e}
1382
- subref=${subref//:/%3a}
1383
- subref=${subref//\?/%3f}
1384
- subref=${subref//\*/%2a}
1385
- subref=${subref//\[/%5b}
1386
- subref=${subref//$'\n'/%0a}
1387
-
1388
- ## 6. They cannot begin or end with a slash / or contain multiple
1389
- ## consecutive slashes.
1390
- ## Note: This rule is not revertable.
1391
- [[ $subref != *//* ]] || subref=$(tr -s / <<< "$subref")
1392
-
1393
- ## 7. They cannot end with a dot ..
1394
- case "$subref" in
1395
- *.) subref=${subref%.}
1396
- subref+=%2e
1397
- ;;
1398
- esac
1399
-
1400
- ## 8. They cannot contain a sequence @\{.
1401
- subref=${subref//@\{/%40\{}
1402
-
1403
- ## 9. They cannot be the single character @.
1404
- ## Note: 'subrepo/' be will prefixed, so this is always true.
1405
-
1406
- ## 10. They cannot contain a \.
1407
- subref=${subref//\\/%5c}
1408
-
1409
- subref=$(git check-ref-format --normalize --allow-onelevel "$subref") ||
1410
- error "Can't determine valid subref from '$subdir'."
1411
- }
1412
-
1413
- #------------------------------------------------------------------------------
1414
- # State file (`.gitrepo`) functions:
1415
- #------------------------------------------------------------------------------
1416
-
1417
- # Set subdir and gitrepo vars:
1418
- read-gitrepo-file() {
1419
- gitrepo=$subdir/.gitrepo
1420
-
1421
- if [[ ! -f $gitrepo ]]; then
1422
- error "No '$gitrepo' file."
1423
- fi
1424
-
1425
- # Read .gitrepo values:
1426
- if [[ -z $subrepo_remote ]]; then
1427
- SAY=false OUT=true RUN git config --file="$gitrepo" subrepo.remote
1428
- subrepo_remote=$output
1429
- fi
1430
-
1431
- if [[ -z $subrepo_branch ]]; then
1432
- SAY=false OUT=true RUN git config --file="$gitrepo" subrepo.branch
1433
- subrepo_branch=$output
1434
- fi
1435
-
1436
- SAY=false OUT=true RUN git config --file="$gitrepo" subrepo.commit
1437
- subrepo_commit=$output
1438
-
1439
- FAIL=false \
1440
- SAY=false OUT=true RUN git config --file="$gitrepo" subrepo.parent
1441
- subrepo_parent=$output
1442
-
1443
- FAIL=false \
1444
- SAY=false OUT=true RUN git config --file="$gitrepo" subrepo.method
1445
- if [[ $output == rebase ]]; then
1446
- join_method=rebase
1447
- else
1448
- # This is the default method
1449
- join_method=merge
1450
- fi
1451
-
1452
- if [[ -z $subrepo_parent ]]; then
1453
- FAIL=false \
1454
- SAY=false OUT=true RUN git config --file="$gitrepo" subrepo.former
1455
- subrepo_former=$output
1456
- fi
1457
- }
1458
-
1459
-
1460
- # Update the subdir/.gitrepo state file:
1461
- update-gitrepo-file() {
1462
- local short_commit=
1463
-
1464
- local newfile=false
1465
- if [[ ! -e $gitrepo ]]; then
1466
-
1467
- FAIL=false RUN git cat-file -e "$original_head_commit":"$gitrepo"
1468
-
1469
- if OK; then
1470
- o "Try to recreate gitrepo file from $original_head_commit"
1471
- git cat-file -p "$original_head_commit":"$gitrepo" > "$gitrepo"
1472
- else
1473
- newfile=true
1474
- cat <<... > "$gitrepo"
1475
- ; DO NOT EDIT (unless you know what you are doing)
1476
- ;
1477
- ; This subdirectory is a git "subrepo", and this file is maintained by the
1478
- ; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme
1479
- ;
1480
- ...
1481
- fi
1482
- fi
1483
-
1484
-
1485
- # TODO: only update remote and branch if supplied and $update_wanted
1486
- if $newfile || [[ $update_wanted && $override_remote ]]; then
1487
- RUN git config --file="$gitrepo" subrepo.remote "$subrepo_remote"
1488
- fi
1489
-
1490
- if $newfile || [[ $update_wanted && $override_branch ]]; then
1491
- RUN git config --file="$gitrepo" subrepo.branch "$subrepo_branch"
1492
- fi
1493
-
1494
- RUN git config --file="$gitrepo" subrepo.commit "$upstream_head_commit"
1495
- # Only write new parent when we are at the head of upstream
1496
- if [[ $upstream_head_commit && $subrepo_commit_ref ]]; then
1497
- OUT=true RUN git rev-parse "$subrepo_commit_ref"
1498
- o "$upstream_head_commit == $output"
1499
- if [[ $upstream_head_commit == "$output" ]]; then
1500
- RUN git config --file="$gitrepo" subrepo.parent "$original_head_commit"
1501
- fi
1502
- fi
1503
-
1504
- [[ -z $join_method ]] && join_method=merge
1505
- RUN git config --file="$gitrepo" subrepo.method "$join_method"
1506
-
1507
- RUN git config --file="$gitrepo" subrepo.cmdver "$VERSION"
1508
-
1509
- RUN git add -f -- "$gitrepo"
1510
- }
1511
-
1512
- #------------------------------------------------------------------------------
1513
- # Enviroment checks:
1514
- #------------------------------------------------------------------------------
1515
-
1516
- # Check that system is ok for this command:
1517
- assert-environment-ok() {
1518
- type git &> /dev/null ||
1519
- error "Can't find your 'git' command in '$PATH'."
1520
-
1521
- git_version=$(git --version | cut -d ' ' -f3)
1522
-
1523
- version-check bash "$REQUIRED_BASH_VERSION" || {
1524
- echo "The 'bashplus' library requires that 'Bash ${REQUIRED_BASH_VERSION}+' is installed." >&2
1525
- echo "It doesn't need to be your shell, but it must be in your PATH." >&2
1526
- if [[ ${OSTYPE-} == darwin* ]]; then
1527
- echo "You appear to be on macOS." >&2
1528
- echo "Try: 'brew install bash'." >&2
1529
- echo "This will not change your user shell, it just installs 'Bash 5.x'." >&2
1530
- fi
1531
- exit 1
1532
- }
1533
-
1534
- version-check git "$REQUIRED_GIT_VERSION" ||
1535
- error "Requires git version $REQUIRED_GIT_VERSION or higher; "`
1536
- `"you have '$git_version'."
1537
-
1538
- if [[ ${BASH_VERSINFO[0]} -lt 4 ]] ; then
1539
- echo "The git-subrepo command requires that 'Bash 4+' is installed."
1540
- echo "It doesn't need to be your shell, but it must be in your PATH."
1541
- if [[ $OSTYPE == darwin* ]]; then
1542
- echo "You appear to be on macOS."
1543
- echo "Try: 'brew install bash'."
1544
- echo "This will not change your user shell, it just installs 'Bash 5.x'."
1545
- fi
1546
- exit 1
1547
- fi
1548
- }
1549
-
1550
- # Make sure git repo is ready:
1551
- assert-repo-is-ready() {
1552
- # Skip this for trivial info commands:
1553
- [[ $command =~ ^(help|version|upgrade)$ ]] && return
1554
-
1555
- # We must be inside a git repo:
1556
- git rev-parse --git-dir &> /dev/null ||
1557
- error "Not inside a git repository."
1558
-
1559
- # Get the original branch and commit:
1560
- git:get-head-branch-name
1561
- original_head_branch=$output
1562
-
1563
- # If a subrepo branch is currently checked out, then note it:
1564
- if [[ $original_head_branch =~ ^subrepo/(.*) ]]; then
1565
- error "Can't '$command' while subrepo branch is checked out."
1566
- fi
1567
-
1568
- # Make sure we are on a branch:
1569
- [[ $original_head_branch == HEAD || -z $original_head_branch ]] &&
1570
- error "Must be on a branch to run this command."
1571
-
1572
- # In a work-tree:
1573
- SAY=false OUT=true RUN git rev-parse --is-inside-work-tree
1574
- [[ $output == true ]] ||
1575
- error "Can't 'subrepo $command' outside a working tree."
1576
-
1577
- # HEAD exists:
1578
- [[ $command == clone ]] ||
1579
- RUN git rev-parse --verify HEAD
1580
-
1581
- assert-working-copy-is-clean
1582
-
1583
- # For now, only support actions from top of repo:
1584
- if [[ $(git rev-parse --show-prefix) ]]; then
1585
- error "Need to run subrepo command from top level directory of the repo."
1586
- fi
1587
- }
1588
-
1589
- assert-working-copy-is-clean() {
1590
- # Repo is in a clean state:
1591
- if [[ $command =~ ^(clone|init|pull|push|branch|commit)$ ]]; then
1592
- # TODO: Should we check for untracked files?
1593
- local pwd
1594
- pwd=$(pwd)
1595
- o "Assert that working copy is clean: $pwd"
1596
- git update-index -q --ignore-submodules --refresh
1597
- git diff-files --quiet --ignore-submodules ||
1598
- error "Can't $command subrepo. Unstaged changes. ($pwd)"
1599
- if [[ $command != clone ]] || git:rev-exists HEAD; then
1600
- git diff-index --quiet --ignore-submodules HEAD ||
1601
- error "Can't $command subrepo. Working tree has changes. ($pwd)"
1602
- git diff-index --quiet --cached --ignore-submodules HEAD ||
1603
- error "Can't $command subrepo. Index has changes. ($pwd)"
1604
- else
1605
- # Repo has no commits and we're cloning a subrepo. Working tree won't
1606
- # possibly have changes as there was nothing initial to change.
1607
- [[ -z $(git ls-files) ]] ||
1608
- error "Can't $command subrepo. Index has changes. ($pwd)"
1609
- fi
1610
- fi
1611
- }
1612
-
1613
- # If subdir exists, make sure it is empty:
1614
- assert-subdir-ready-for-init() {
1615
- if [[ ! -e $subdir ]]; then
1616
- error "The subdir '$subdir' does not exist."
1617
- fi
1618
- if [[ -e $subdir/.gitrepo ]]; then
1619
- error "The subdir '$subdir' is already a subrepo."
1620
- fi
1621
- # Check that subdir is part of the repo
1622
- if [[ -z $(git log -1 --date=default -- "$subdir") ]]; then
1623
- error "The subdir '$subdir' is not part of this repo."
1624
- fi
1625
- }
1626
-
1627
- # If subdir exists, make sure it is empty:
1628
- assert-subdir-empty() {
1629
- if [[ -e $subdir ]] && [[ $(ls -A "$subdir") ]]; then
1630
- error "The subdir '$subdir' exists and is not empty."
1631
- fi
1632
- }
1633
-
1634
- #------------------------------------------------------------------------------
1635
- # Getters of various information:
1636
- #------------------------------------------------------------------------------
1637
-
1638
- # Find all the current subrepos by looking for all the subdirectories that
1639
- # contain a `.gitrepo` file.
1640
- get-all-subrepos() {
1641
- local paths
1642
- mapfile -t paths < <(git ls-files | sed -n 's!/\.gitrepo$!!p' | sort)
1643
- subrepos=()
1644
- local path
1645
- for path in "${paths[@]}"; do
1646
- add-subrepo "$path"
1647
- done
1648
- }
1649
-
1650
- add-subrepo() {
1651
- if ! $ALL_wanted; then
1652
- for path in "${subrepos[@]}"; do
1653
- [[ $1/ =~ ^$path/ ]] && return
1654
- done
1655
- fi
1656
- subrepos+=("$1")
1657
- }
1658
-
1659
- # Determine the upstream's default head branch:
1660
- get-upstream-head-branch() {
1661
- local remotes branch
1662
- OUT=true RUN git ls-remote --symref "$subrepo_remote"
1663
- remotes=$output
1664
- [[ $remotes ]] ||
1665
- error "Failed to 'git ls-remote --symref $subrepo_remote'."
1666
-
1667
- # 'ref: refs/heads/master HEAD'
1668
- branch=$(
1669
- echo "$remotes" |
1670
- grep "^ref:" | grep 'HEAD$' | cut -f2 -d':' | cut -f1 |
1671
- head -n1
1672
- )
1673
- branch=${branch/ }
1674
- [[ $branch =~ refs/heads/ ]] ||
1675
- error "Problem finding remote default head branch."
1676
- output=${branch#refs/heads/}
1677
- }
1678
-
1679
- # Commit msg for an action commit:
1680
- # Don't use RUN here as it will pollute commit message
1681
- get-commit-message() {
1682
- local commit=none
1683
- if git:rev-exists "$upstream_head_commit"; then
1684
- commit=$(git rev-parse --short "$upstream_head_commit")
1685
- fi
1686
-
1687
- local args=() debug_wanted=false
1688
- if $all_wanted; then
1689
- args+=("$subdir")
1690
- fi
1691
- args+=("${commit_msg_args[@]}")
1692
-
1693
- # Find the specific git-subrepo code used:
1694
- local command_remote='???'
1695
- local command_commit='???'
1696
- get-command-info
1697
-
1698
- local merged=none
1699
- if git:rev-exists "$subrepo_commit_ref"; then
1700
- merged=$(git rev-parse --short "$subrepo_commit_ref")
1701
- fi
1702
-
1703
- local is_merge=''
1704
- if [[ $command != push ]]; then
1705
- if git:is_merge_commit "$subrepo_commit_ref"; then
1706
- is_merge=" (merge)"
1707
- fi
1708
- fi
1709
-
1710
- # TODO: Consider output for push!
1711
-
1712
- # Format subrepo commit message:
1713
- cat <<...
1714
- git subrepo $command$is_merge ${args[*]}
1715
-
1716
- subrepo:
1717
- subdir: "$subdir"
1718
- merged: "$merged"
1719
- upstream:
1720
- origin: "$subrepo_remote"
1721
- branch: "$subrepo_branch"
1722
- commit: "$commit"
1723
- git-subrepo:
1724
- version: "$VERSION"
1725
- origin: "$command_remote"
1726
- commit: "$command_commit"
1727
- ...
1728
- }
1729
-
1730
- # Get location and version info about the git-subrepo command itself. This
1731
- # info goes into commit messages, so we can find out exactly how the commits
1732
- # were done.
1733
- get-command-info() {
1734
- local bin=$0
1735
- if [[ $bin =~ / ]]; then
1736
- local lib
1737
- lib=$(dirname "$bin")
1738
- # XXX Makefile needs to install these symlinks:
1739
- # If `git-subrepo` was system-installed (`make install`):
1740
- if [[ -e $lib/git-subrepo.d/upstream ]] &&
1741
- [[ -e $lib/git-subrepo.d/commit ]]; then
1742
- command_remote=$(readlink "$lib/git-subrepo.d/upstream")
1743
- command_commit=$(readlink "$lib/git-subrepo.d/commit")
1744
- elif [[ $lib =~ / ]]; then
1745
- lib=$(dirname "$lib")
1746
- if [[ -d $lib/.git ]]; then
1747
- local remote
1748
- remote=$(
1749
- GIT_DIR=$lib/.git git remote -v |
1750
- grep '^origin' |
1751
- head -n1 |
1752
- cut -f2 |
1753
- cut -d ' ' -f1
1754
- )
1755
- if [[ $remote ]]; then
1756
- command_remote=$remote
1757
- else
1758
- local remote
1759
- remote=$(
1760
- GIT_DIR=$lib/.git git remote -v |
1761
- head -n1 |
1762
- cut -f2 |
1763
- cut -d ' ' -f1
1764
- )
1765
- if [[ $remote ]]; then
1766
- command_remote=$remote
1767
- fi
1768
- fi
1769
- local commit
1770
- commit=$(GIT_DIR=$lib/.git git rev-parse --short HEAD)
1771
- if [[ $commit ]]; then
1772
- command_commit=$commit
1773
- fi
1774
- fi
1775
- fi
1776
- fi
1777
- }
1778
-
1779
- #------------------------------------------------------------------------------
1780
- # Instructional errors:
1781
- #------------------------------------------------------------------------------
1782
-
1783
- error-join() {
1784
- cat <<...
1785
-
1786
- You will need to finish the $command by hand. A new working tree has been
1787
- created at $worktree so that you can resolve the conflicts
1788
- shown in the output above.
1789
-
1790
- This is the common conflict resolution workflow:
1791
-
1792
- 1. cd $worktree
1793
- 2. Resolve the conflicts (see "git status").
1794
- 3. "git add" the resolved files.
1795
- ...
1796
-
1797
- if [[ $join_method == rebase ]]; then
1798
- cat <<...
1799
- 4. git rebase --continue
1800
- ...
1801
- else
1802
- cat <<...
1803
- 4. git commit
1804
- ...
1805
- fi
1806
-
1807
- cat <<...
1808
- 5. If there are more conflicts, restart at step 2.
1809
- 6. cd $start_pwd
1810
- ...
1811
- local branch_name=${branch:=subrepo/$subdir}
1812
- if [[ $command == push ]]; then
1813
- cat <<...
1814
- 7. git subrepo push $subdir $branch_name
1815
- ...
1816
- else
1817
- cat <<...
1818
- 7. git subrepo commit $subdir
1819
- ...
1820
- fi
1821
-
1822
- if [[ $command == pull && $join_method == rebase ]]; then
1823
- cat <<...
1824
-
1825
- After you have performed the steps above you can push your local changes
1826
- without repeating the rebase by:
1827
- 1. git subrepo push $subdir $branch_name
1828
-
1829
- ...
1830
- fi
1831
-
1832
- cat <<...
1833
- See "git help $join_method" for details.
1834
-
1835
- Alternatively, you can abort the $command and reset back to where you started:
1836
-
1837
- 1. git subrepo clean $subdir
1838
-
1839
- See "git help subrepo" for more help.
1840
-
1841
- ...
1842
- }
1843
-
1844
- #------------------------------------------------------------------------------
1845
- # Git command wrappers:
1846
- #------------------------------------------------------------------------------
1847
-
1848
- git:branch-exists() {
1849
- git:rev-exists "refs/heads/$1"
1850
- }
1851
-
1852
- git:rev-exists() {
1853
- git rev-list "$1" -1 &> /dev/null
1854
- }
1855
-
1856
- git:ref-exists() {
1857
- [[ $(git for-each-ref "$1") ]]
1858
- }
1859
-
1860
- git:get-head-branch-name() {
1861
- output=
1862
- local name
1863
- name=$(git symbolic-ref --short --quiet HEAD) || true
1864
- [[ $name == HEAD ]] && return
1865
- output=$name
1866
- }
1867
-
1868
- git:get-head-branch-commit() {
1869
- output=$(git rev-parse HEAD)
1870
- }
1871
-
1872
- git:commit-in-rev-list() {
1873
- local commit=$1
1874
- local list_head=$2
1875
- git rev-list "$list_head" | grep -q "^$commit"
1876
- }
1877
-
1878
- git:make-ref() {
1879
- local ref_name=$1
1880
- local commit
1881
- commit=$(git rev-parse "$2")
1882
- RUN git update-ref "$ref_name" "$commit"
1883
- }
1884
-
1885
- git:is_merge_commit() {
1886
- local commit=$1
1887
- git show --summary "$commit" | grep -q ^Merge:
1888
- }
1889
-
1890
- git:create-worktree() {
1891
- local branch=$1
1892
- worktree=$GIT_TMP/$branch
1893
- RUN git worktree add "$worktree" "$branch"
1894
- }
1895
-
1896
- git:remove-worktree() {
1897
- o "Remove worktree: $worktree"
1898
- if [[ -d $worktree ]]; then
1899
- o "Check worktree for unsaved changes"
1900
- cd "$worktree"
1901
- assert-working-copy-is-clean
1902
- cd "$start_pwd"
1903
-
1904
- o "Clean up worktree $worktree"
1905
- rm -rf "$worktree"
1906
- RUN git worktree prune
1907
- fi
1908
- }
1909
-
1910
- git:delete-branch() {
1911
- local branch=$1
1912
- o "Deleting old '$branch' branch."
1913
- # Remove worktree first, otherwise you can't delete the branch
1914
- git:remove-worktree
1915
- FAIL=false RUN git branch -D "$branch"
1916
- }
1917
-
1918
-
1919
- #------------------------------------------------------------------------------
1920
- # Low level sugar commands:
1921
- #------------------------------------------------------------------------------
1922
-
1923
- # Smart command runner:
1924
- RUN() {
1925
- $debug_wanted && $SAY && say ">>> $*"
1926
- if $EXEC; then
1927
- "$@"
1928
- return $?
1929
- fi
1930
-
1931
- OK=true
1932
- set +e
1933
- local rc=
1934
- local out=
1935
- if $debug_wanted && $TTY && interactive; then
1936
- "$@"
1937
- else
1938
- if $OUT; then
1939
- out=$("$@" 2>/dev/null)
1940
- else
1941
- out=$("$@" 2>&1)
1942
- fi
1943
- fi
1944
- rc=$?
1945
- set -e
1946
-
1947
- if [[ $rc -ne 0 ]]; then
1948
- OK=false
1949
- $FAIL && error "Command failed: '$*'.\n$out"
1950
- fi
1951
- output=$out
1952
- }
1953
-
1954
-
1955
- interactive() {
1956
- if [[ -t 0 && -t 1 ]]; then
1957
- return 0
1958
- else
1959
- return 1
1960
- fi
1961
- }
1962
-
1963
- # Call a function with indent increased:
1964
- CALL() {
1965
- local INDENT=" $INDENT"
1966
- "$@" || true
1967
- }
1968
-
1969
- # Print verbose steps for commands with steps:
1970
- o() {
1971
- if $verbose_wanted; then
1972
- echo "$INDENT* $*"
1973
- fi
1974
- }
1975
-
1976
- # Print unless quiet mode:
1977
- say() {
1978
- $quiet_wanted || echo "$@"
1979
- }
1980
-
1981
- # Print to stderr:
1982
- err() {
1983
- echo "$@" >&2
1984
- }
1985
-
1986
- # Check if OK:
1987
- OK() {
1988
- $OK
1989
- }
1990
-
1991
- # Nicely report common error messages:
1992
- usage-error() {
1993
- local msg="git-subrepo: $1" usage=
1994
- if [[ $GIT_SUBREPO_TEST_ERRORS != true ]]; then
1995
- source "${SOURCE_DIR}/git-subrepo.d/help-functions.bash"
1996
- if can "help:$command"; then
1997
- msg=$'\n'"$msg"$'\n'"$("help:$command")"$'\n'
1998
- fi
1999
- fi
2000
- echo "$msg" >&2
2001
- exit 1
2002
- }
2003
-
2004
- # Nicely report common error messages:
2005
- error() {
2006
- echo -e "git-subrepo:" "$@" >&2
2007
- exit 1
2008
- }
2009
-
2010
- # Start at the end:
2011
- [[ ${BASH_SOURCE[0]} != "$0" ]] || main "$@"
2012
-
2013
- # Local Variables:
2014
- # tab-width: 2
2015
- # sh-indentation: 2
2016
- # sh-basic-offset: 2
2017
- # End:
2018
- # vim: set ft=sh sw=2 lisp: