avm-tools 0.48.0 → 0.53.0

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