acts-as-messageable 0.5.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +8 -0
  3. data/.github/workflows/test.yml +152 -0
  4. data/.rubocop.yml +14 -1
  5. data/.rubocop_todo.yml +49 -7
  6. data/.ruby-version +1 -0
  7. data/Appraisals +11 -0
  8. data/Dockerfile +2 -1
  9. data/Gemfile +19 -13
  10. data/Gemfile.lock +186 -97
  11. data/README.md +2 -3
  12. data/Rakefile +6 -1
  13. data/VERSION +1 -1
  14. data/acts-as-messageable.gemspec +193 -40
  15. data/bin/tapioca +29 -0
  16. data/docker-compose.yml +82 -71
  17. data/gemfiles/rails_3.2.gemfile +14 -9
  18. data/gemfiles/rails_4.2.gemfile +14 -9
  19. data/gemfiles/rails_5.2.gemfile +14 -9
  20. data/gemfiles/rails_6.0.gemfile +14 -9
  21. data/gemfiles/rails_7.0.gemfile +29 -0
  22. data/gemfiles/rails_master.gemfile +15 -9
  23. data/lib/acts-as-messageable.rb +1 -0
  24. data/lib/acts_as_messageable/message.rb +62 -5
  25. data/lib/acts_as_messageable/model.rb +71 -20
  26. data/lib/acts_as_messageable/rails3.rb +27 -2
  27. data/lib/acts_as_messageable/rails4.rb +31 -4
  28. data/lib/acts_as_messageable/rails6.rb +34 -2
  29. data/lib/acts_as_messageable/railtie.rb +1 -0
  30. data/lib/acts_as_messageable/relation.rb +18 -2
  31. data/lib/acts_as_messageable/scopes.rb +11 -0
  32. data/lib/acts_as_messageable.rb +18 -0
  33. data/lib/generators/acts_as_messageable/migration/migration_generator.rb +4 -0
  34. data/lib/generators/acts_as_messageable/migration/templates/migration.rb +1 -0
  35. data/lib/generators/acts_as_messageable/migration/templates/migration_indexes.rb +1 -0
  36. data/lib/generators/acts_as_messageable/migration/templates/migration_opened_as_datetime.rb +1 -0
  37. data/lib/generators/acts_as_messageable/migration/templates/migration_permanent.rb +1 -0
  38. data/sorbet/config +4 -0
  39. data/sorbet/rbi/annotations/actionpack.rbi +428 -0
  40. data/sorbet/rbi/annotations/actionview.rbi +77 -0
  41. data/sorbet/rbi/annotations/activerecord.rbi +18 -0
  42. data/sorbet/rbi/annotations/activesupport.rbi +52 -0
  43. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  44. data/sorbet/rbi/annotations/railties.rbi +58 -0
  45. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  46. data/sorbet/rbi/dsl/abstract_controller/caching/fragments.rbi +23 -0
  47. data/sorbet/rbi/dsl/abstract_controller/caching.rbi +30 -0
  48. data/sorbet/rbi/dsl/abstract_controller/callbacks.rbi +23 -0
  49. data/sorbet/rbi/dsl/abstract_controller/helpers.rbi +23 -0
  50. data/sorbet/rbi/dsl/abstract_controller/rendering.rbi +9 -0
  51. data/sorbet/rbi/dsl/abstract_controller/url_for.rbi +23 -0
  52. data/sorbet/rbi/dsl/action_controller/caching.rbi +29 -0
  53. data/sorbet/rbi/dsl/action_controller/conditional_get.rbi +23 -0
  54. data/sorbet/rbi/dsl/action_controller/content_security_policy.rbi +31 -0
  55. data/sorbet/rbi/dsl/action_controller/data_streaming.rbi +9 -0
  56. data/sorbet/rbi/dsl/action_controller/etag_with_flash.rbi +24 -0
  57. data/sorbet/rbi/dsl/action_controller/etag_with_template_digest.rbi +30 -0
  58. data/sorbet/rbi/dsl/action_controller/flash.rbi +19 -0
  59. data/sorbet/rbi/dsl/action_controller/form_builder.rbi +19 -0
  60. data/sorbet/rbi/dsl/action_controller/helpers.rbi +36 -0
  61. data/sorbet/rbi/dsl/action_controller/params_wrapper.rbi +23 -0
  62. data/sorbet/rbi/dsl/action_controller/redirecting.rbi +24 -0
  63. data/sorbet/rbi/dsl/action_controller/renderers/all.rbi +24 -0
  64. data/sorbet/rbi/dsl/action_controller/renderers.rbi +23 -0
  65. data/sorbet/rbi/dsl/action_controller/request_forgery_protection.rbi +31 -0
  66. data/sorbet/rbi/dsl/action_controller/rescue.rbi +24 -0
  67. data/sorbet/rbi/dsl/action_controller/test_case/behavior.rbi +24 -0
  68. data/sorbet/rbi/dsl/action_controller/url_for.rbi +24 -0
  69. data/sorbet/rbi/dsl/action_dispatch/routing/url_for.rbi +23 -0
  70. data/sorbet/rbi/dsl/action_view/helpers/form_helper.rbi +10 -0
  71. data/sorbet/rbi/dsl/action_view/helpers/form_tag_helper.rbi +10 -0
  72. data/sorbet/rbi/dsl/action_view/helpers/text_helper.rbi +9 -0
  73. data/sorbet/rbi/dsl/action_view/helpers.rbi +10 -0
  74. data/sorbet/rbi/dsl/action_view/layouts.rbi +24 -0
  75. data/sorbet/rbi/dsl/action_view/rendering.rbi +9 -0
  76. data/sorbet/rbi/dsl/active_model/attribute_methods.rbi +27 -0
  77. data/sorbet/rbi/dsl/active_model/attributes.rbi +34 -0
  78. data/sorbet/rbi/dsl/active_model/dirty.rbi +28 -0
  79. data/sorbet/rbi/dsl/active_model/serializers/json.rbi +22 -0
  80. data/sorbet/rbi/dsl/active_model/validations/callbacks.rbi +22 -0
  81. data/sorbet/rbi/dsl/active_model/validations.rbi +27 -0
  82. data/sorbet/rbi/dsl/active_record/attribute_methods/dirty.rbi +38 -0
  83. data/sorbet/rbi/dsl/active_record/attribute_methods/time_zone_conversion.rbi +32 -0
  84. data/sorbet/rbi/dsl/active_record/attribute_methods.rbi +53 -0
  85. data/sorbet/rbi/dsl/active_record/attributes.rbi +19 -0
  86. data/sorbet/rbi/dsl/active_record/callbacks.rbi +22 -0
  87. data/sorbet/rbi/dsl/active_record/core.rbi +55 -0
  88. data/sorbet/rbi/dsl/active_record/encryption/encryptable_record.rbi +23 -0
  89. data/sorbet/rbi/dsl/active_record/inheritance.rbi +27 -0
  90. data/sorbet/rbi/dsl/active_record/integration.rbi +32 -0
  91. data/sorbet/rbi/dsl/active_record/locking/optimistic.rbi +22 -0
  92. data/sorbet/rbi/dsl/active_record/model_schema.rbi +52 -0
  93. data/sorbet/rbi/dsl/active_record/nested_attributes.rbi +22 -0
  94. data/sorbet/rbi/dsl/active_record/readonly_attributes.rbi +19 -0
  95. data/sorbet/rbi/dsl/active_record/reflection.rbi +32 -0
  96. data/sorbet/rbi/dsl/active_record/scoping/default.rbi +23 -0
  97. data/sorbet/rbi/dsl/active_record/scoping.rbi +23 -0
  98. data/sorbet/rbi/dsl/active_record/serialization.rbi +22 -0
  99. data/sorbet/rbi/dsl/active_record/signed_id.rbi +22 -0
  100. data/sorbet/rbi/dsl/active_record/test_fixtures.rbi +58 -0
  101. data/sorbet/rbi/dsl/active_record/timestamp.rbi +23 -0
  102. data/sorbet/rbi/dsl/active_record/validations.rbi +28 -0
  103. data/sorbet/rbi/dsl/active_support/actionable_error.rbi +23 -0
  104. data/sorbet/rbi/dsl/active_support/callbacks.rbi +22 -0
  105. data/sorbet/rbi/dsl/active_support/rescuable.rbi +23 -0
  106. data/sorbet/rbi/dsl/active_support/testing/file_fixtures.rbi +22 -0
  107. data/sorbet/rbi/gems/actionpack@7.0.4.3.rbi +19265 -0
  108. data/sorbet/rbi/gems/actionview@7.0.4.3.rbi +15482 -0
  109. data/sorbet/rbi/gems/activemodel@7.0.4.3.rbi +6025 -0
  110. data/sorbet/rbi/gems/activerecord@7.0.4.3.rbi +37852 -0
  111. data/sorbet/rbi/gems/activesupport@7.0.4.3.rbi +18788 -0
  112. data/sorbet/rbi/gems/addressable@2.4.0.rbi +8 -0
  113. data/sorbet/rbi/gems/appraisal@2.4.1.rbi +584 -0
  114. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  115. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  116. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
  117. data/sorbet/rbi/gems/commander@4.6.0.rbi +8 -0
  118. data/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi +11545 -0
  119. data/sorbet/rbi/gems/coveralls_reborn@0.27.0.rbi +8 -0
  120. data/sorbet/rbi/gems/crass@1.0.6.rbi +622 -0
  121. data/sorbet/rbi/gems/descendants_tracker@0.0.4.rbi +8 -0
  122. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
  123. data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
  124. data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
  125. data/sorbet/rbi/gems/faraday@0.9.2.rbi +964 -0
  126. data/sorbet/rbi/gems/git@1.11.0.rbi +2700 -0
  127. data/sorbet/rbi/gems/github_api@0.16.0.rbi +8 -0
  128. data/sorbet/rbi/gems/hashie@5.0.0.rbi +8 -0
  129. data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
  130. data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
  131. data/sorbet/rbi/gems/jeweler@2.3.9.rbi +1591 -0
  132. data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
  133. data/sorbet/rbi/gems/jwt@2.5.0.rbi +8 -0
  134. data/sorbet/rbi/gems/loofah@2.19.1.rbi +904 -0
  135. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  136. data/sorbet/rbi/gems/mime-types@2.99.3.rbi +8 -0
  137. data/sorbet/rbi/gems/minitest@5.18.0.rbi +1491 -0
  138. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +8 -0
  139. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +8 -0
  140. data/sorbet/rbi/gems/multipart-post@2.2.3.rbi +8 -0
  141. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  142. data/sorbet/rbi/gems/nokogiri@1.14.2.rbi +7244 -0
  143. data/sorbet/rbi/gems/oauth2@1.4.8.rbi +8 -0
  144. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  145. data/sorbet/rbi/gems/pg@1.4.6.rbi +2574 -0
  146. data/sorbet/rbi/gems/polyfill@1.9.0.rbi +8 -0
  147. data/sorbet/rbi/gems/pry@0.14.2.rbi +10081 -0
  148. data/sorbet/rbi/gems/psych@4.0.6.rbi +1819 -0
  149. data/sorbet/rbi/gems/racc@1.6.2.rbi +155 -0
  150. data/sorbet/rbi/gems/rack-test@2.0.2.rbi +943 -0
  151. data/sorbet/rbi/gems/rack@2.2.6.4.rbi +5659 -0
  152. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +455 -0
  153. data/sorbet/rbi/gems/rails-html-sanitizer@1.5.0.rbi +685 -0
  154. data/sorbet/rbi/gems/railties@7.0.4.3.rbi +4553 -0
  155. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +8 -0
  156. data/sorbet/rbi/gems/rake@13.0.6.rbi +2959 -0
  157. data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
  158. data/sorbet/rbi/gems/rbs@2.8.0.rbi +8 -0
  159. data/sorbet/rbi/gems/rchardet@1.8.0.rbi +1078 -0
  160. data/sorbet/rbi/gems/rdoc@6.5.0.rbi +12441 -0
  161. data/sorbet/rbi/gems/regexp_parser@2.7.0.rbi +8 -0
  162. data/sorbet/rbi/gems/rexml@3.2.5.rbi +8 -0
  163. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10798 -0
  164. data/sorbet/rbi/gems/rspec-expectations@3.12.0.rbi +8090 -0
  165. data/sorbet/rbi/gems/rspec-mocks@3.12.0.rbi +5296 -0
  166. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1617 -0
  167. data/sorbet/rbi/gems/rspec@3.12.0.rbi +88 -0
  168. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +8 -0
  169. data/sorbet/rbi/gems/safe_type@1.1.1.rbi +8 -0
  170. data/sorbet/rbi/gems/semver2@3.4.2.rbi +8 -0
  171. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
  172. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +8 -0
  173. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
  174. data/sorbet/rbi/gems/sorbet-coerce@0.7.0.rbi +8 -0
  175. data/sorbet/rbi/gems/stringio@3.0.2.rbi +8 -0
  176. data/sorbet/rbi/gems/sync@0.5.0.rbi +8 -0
  177. data/sorbet/rbi/gems/term-ansicolor@1.7.1.rbi +8 -0
  178. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  179. data/sorbet/rbi/gems/thread_safe@0.3.6.rbi +8 -0
  180. data/sorbet/rbi/gems/timecop@0.9.6.rbi +361 -0
  181. data/sorbet/rbi/gems/tins@1.32.1.rbi +8 -0
  182. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5917 -0
  183. data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +8 -0
  184. data/sorbet/rbi/gems/unparser@0.6.7.rbi +4515 -0
  185. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2553 -0
  186. data/sorbet/rbi/gems/yard@0.9.28.rbi +17954 -0
  187. data/sorbet/rbi/gems/zeitwerk@2.6.7.rbi +966 -0
  188. data/sorbet/rbi/models/acts-as-messageable/message.rbi +668 -0
  189. data/sorbet/rbi/models/acts-as-messageable/user.rbi +343 -0
  190. data/sorbet/rbi/rails-rbi/active_record_base.rbi +119 -0
  191. data/sorbet/rbi/rails-rbi/active_record_relation.rbi +180 -0
  192. data/sorbet/rbi/shims/activerecord.rbi +4 -0
  193. data/sorbet/rbi/shims/model.rbi +9 -0
  194. data/sorbet/tapioca/config.yml +10 -0
  195. data/sorbet/tapioca/pre_require.rb +5 -0
  196. data/sorbet/tapioca/require.rb +10 -0
  197. data/spec/acts_as_messageable_spec.rb +7 -4
  198. data/spec/custom_class_spec.rb +1 -0
  199. data/spec/custom_required_spec.rb +8 -4
  200. data/spec/group_messages_spec.rb +1 -0
  201. data/spec/migrations_spec.rb +2 -1
  202. data/spec/spec_helper.rb +19 -9
  203. data/spec/support/admin.rb +3 -0
  204. data/spec/support/custom_message.rb +3 -0
  205. data/spec/support/custom_message_uuid.rb +1 -0
  206. data/spec/support/custom_search_user.rb +3 -0
  207. data/spec/support/men.rb +1 -0
  208. data/spec/support/send_message.rb +8 -1
  209. data/spec/support/table_schema.rb +7 -6
  210. data/spec/support/user.rb +3 -0
  211. data/spec/support/uuid_user.rb +3 -0
  212. data/tasks/types.rake +46 -0
  213. metadata +261 -11
  214. data/.travis.yml +0 -55
@@ -0,0 +1,2700 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `git` gem.
5
+ # Please instead update this file by running `bin/tapioca gem git`.
6
+
7
+ # The Git module provides the basic functions to open a git
8
+ # reference to work with. You can open a working directory,
9
+ # open a bare repository, initialize a new repo or clone an
10
+ # existing remote repository.
11
+ #
12
+ # @author Scott Chacon (mailto:schacon@gmail.com)
13
+ #
14
+ # source://git//lib/git/author.rb#1
15
+ module Git
16
+ # g.config('user.name', 'Scott Chacon') # sets value
17
+ # g.config('user.email', 'email@email.com') # sets value
18
+ # g.config('user.name') # returns 'Scott Chacon'
19
+ # g.config # returns whole config hash
20
+ #
21
+ # source://git//lib/git.rb#46
22
+ def config(name = T.unsafe(nil), value = T.unsafe(nil)); end
23
+
24
+ # source://git//lib/git.rb#68
25
+ def global_config(name = T.unsafe(nil), value = T.unsafe(nil)); end
26
+
27
+ class << self
28
+ # Open a bare repository
29
+ #
30
+ # Opens a bare repository located in the `git_dir` directory.
31
+ # Since there is no working copy, you can not checkout or commit
32
+ # but you can do most read operations.
33
+ #
34
+ # @example Open a bare repository and retrieve the first commit SHA
35
+ # repository = Git.bare('ruby-git.git')
36
+ # puts repository.log[0].sha #=> "64c6fa011d3287bab9158049c85f3e85718854a0"
37
+ # @option options
38
+ # @param git_dir [Pathname] The path to the bare repository directory
39
+ # containing an initialized Git repository. If a relative path is given, it
40
+ # is converted to an absolute path using
41
+ # [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
42
+ # @param options [Hash] The options for this command (see list of valid
43
+ # options below)
44
+ # @return [Git::Base] an object that can execute git commands in the context
45
+ # of the bare repository.
46
+ # @see https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbarerepositoryabarerepository What is a bare repository?
47
+ #
48
+ # source://git//lib/git.rb#100
49
+ def bare(git_dir, options = T.unsafe(nil)); end
50
+
51
+ # Clone a repository into an empty or newly created directory
52
+ #
53
+ # @example Clone into the default directory `ruby-git`
54
+ # git = Git.clone('https://github.com/ruby-git/ruby-git.git')
55
+ # @example Clone and then checkout the `development` branch
56
+ # git = Git.clone('https://github.com/ruby-git/ruby-git.git', branch: 'development')
57
+ # @example Clone into a different directory `my-ruby-git`
58
+ # git = Git.clone('https://github.com/ruby-git/ruby-git.git', 'my-ruby-git')
59
+ # # or:
60
+ # git = Git.clone('https://github.com/ruby-git/ruby-git.git', path: 'my-ruby-git')
61
+ # @example Create a bare repository in the directory `ruby-git.git`
62
+ # git = Git.clone('https://github.com/ruby-git/ruby-git.git', bare: true)
63
+ # @option options
64
+ # @option options
65
+ # @option options
66
+ # @option options
67
+ # @option options
68
+ # @option options
69
+ # @option options
70
+ # @option options
71
+ # @param repository [URI, Pathname] The (possibly remote) repository to clone
72
+ # from. See [GIT URLS](https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a)
73
+ # for more information.
74
+ # @param name [Pathname] The directory to clone into.
75
+ # @param options [Hash] The options for this command (see list of valid
76
+ # options below)
77
+ # @return [Git::Base] an object that can execute git commands in the context
78
+ # of the cloned local working copy or cloned repository.
79
+ # @see https://git-scm.com/docs/git-clone git clone
80
+ # @see https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a GIT URLs
81
+ #
82
+ # source://git//lib/git.rb#160
83
+ def clone(repository, name, options = T.unsafe(nil)); end
84
+
85
+ # source://git//lib/git.rb#64
86
+ def config; end
87
+
88
+ # @yield [Base.config]
89
+ #
90
+ # source://git//lib/git.rb#60
91
+ def configure; end
92
+
93
+ # Export the current HEAD (or a branch, if <tt>options[:branch]</tt>
94
+ # is specified) into the +name+ directory, then remove all traces of git from the
95
+ # directory.
96
+ #
97
+ # See +clone+ for options. Does not obey the <tt>:remote</tt> option,
98
+ # since the .git info will be deleted anyway; always uses the default
99
+ # remote, 'origin.'
100
+ #
101
+ # source://git//lib/git.rb#171
102
+ def export(repository, name, options = T.unsafe(nil)); end
103
+
104
+ # Same as g.config, but forces it to be at the global level
105
+ #
106
+ # g.config('user.name', 'Scott Chacon') # sets value
107
+ # g.config('user.email', 'email@email.com') # sets value
108
+ # g.config('user.name') # returns 'Scott Chacon'
109
+ # g.config # returns whole config hash
110
+ #
111
+ # source://git//lib/git.rb#184
112
+ def global_config(name = T.unsafe(nil), value = T.unsafe(nil)); end
113
+
114
+ # Create an empty Git repository or reinitialize an existing Git repository
115
+ #
116
+ # @example Initialize a repository in the current directory
117
+ # git = Git.init
118
+ # @example Initialize a repository in some other directory
119
+ # git = Git.init '~/code/ruby-git'
120
+ # @example Initialize a bare repository
121
+ # git = Git.init '~/code/ruby-git.git', bare: true
122
+ # @example Initialize a repository in a non-default location (outside of the working copy)
123
+ # git = Git.init '~/code/ruby-git', repository: '~/code/ruby-git.git'
124
+ # @option options
125
+ # @option options
126
+ # @option options
127
+ # @option options
128
+ # @param directory [Pathname] If the `:bare` option is NOT given or is not
129
+ # `true`, the repository will be created in `"#{directory}/.git"`.
130
+ # Otherwise, the repository is created in `"#{directory}"`.
131
+ #
132
+ # All directories along the path to `directory` are created if they do not exist.
133
+ #
134
+ # A relative path is referenced from the current working directory of the process
135
+ # and converted to an absolute path using
136
+ # [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
137
+ # @param options [Hash] The options for this command (see list of valid
138
+ # options below)
139
+ # @return [Git::Base] an object that can execute git commands in the context
140
+ # of the newly initialized repository
141
+ # @see https://git-scm.com/docs/git-init git init
142
+ #
143
+ # source://git//lib/git.rb#248
144
+ def init(directory = T.unsafe(nil), options = T.unsafe(nil)); end
145
+
146
+ # returns a Hash containing information about the references
147
+ # of the target repository
148
+ #
149
+ # options
150
+ # :refs
151
+ #
152
+ # @param location [String|NilClass] the target repository location or nil for '.'
153
+ # @return [{String=>Hash}] the available references of the target repo.
154
+ #
155
+ # source://git//lib/git.rb#260
156
+ def ls_remote(location = T.unsafe(nil), options = T.unsafe(nil)); end
157
+
158
+ # Open a an existing Git working directory
159
+ #
160
+ # Git.open will most likely be the most common way to create
161
+ # a git reference, referring to an existing working directory.
162
+ #
163
+ # If not provided in the options, the library will assume
164
+ # the repository and index are in the default places (`.git/`, `.git/index`).
165
+ #
166
+ # @example Open the Git working directory in the current directory
167
+ # git = Git.open
168
+ # @example Open a Git working directory in some other directory
169
+ # git = Git.open('~/Projects/ruby-git')
170
+ # @example Use a logger to see what is going on
171
+ # logger = Logger.new(STDOUT)
172
+ # git = Git.open('~/Projects/ruby-git', log: logger)
173
+ # @example Open a working copy whose repository is in a non-standard directory
174
+ # git = Git.open('~/Projects/ruby-git', repository: '~/Project/ruby-git.git')
175
+ # @option options
176
+ # @option options
177
+ # @option options
178
+ # @param working_dir [Pathname] the path to the working directory to use
179
+ # for git commands.
180
+ #
181
+ # A relative path is referenced from the current working directory of the process
182
+ # and converted to an absolute path using
183
+ # [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
184
+ # @param options [Hash] The options for this command (see list of valid
185
+ # options below)
186
+ # @return [Git::Base] an object that can execute git commands in the context
187
+ # of the opened working copy
188
+ #
189
+ # source://git//lib/git.rb#308
190
+ def open(working_dir, options = T.unsafe(nil)); end
191
+ end
192
+ end
193
+
194
+ # source://git//lib/git/author.rb#2
195
+ class Git::Author
196
+ # @return [Author] a new instance of Author
197
+ #
198
+ # source://git//lib/git/author.rb#5
199
+ def initialize(author_string); end
200
+
201
+ # Returns the value of attribute date.
202
+ #
203
+ # source://git//lib/git/author.rb#3
204
+ def date; end
205
+
206
+ # Sets the attribute date
207
+ #
208
+ # @param value the value to set the attribute date to.
209
+ #
210
+ # source://git//lib/git/author.rb#3
211
+ def date=(_arg0); end
212
+
213
+ # Returns the value of attribute email.
214
+ #
215
+ # source://git//lib/git/author.rb#3
216
+ def email; end
217
+
218
+ # Sets the attribute email
219
+ #
220
+ # @param value the value to set the attribute email to.
221
+ #
222
+ # source://git//lib/git/author.rb#3
223
+ def email=(_arg0); end
224
+
225
+ # Returns the value of attribute name.
226
+ #
227
+ # source://git//lib/git/author.rb#3
228
+ def name; end
229
+
230
+ # Sets the attribute name
231
+ #
232
+ # @param value the value to set the attribute name to.
233
+ #
234
+ # source://git//lib/git/author.rb#3
235
+ def name=(_arg0); end
236
+ end
237
+
238
+ # Git::Base is the main public interface for interacting with Git commands.
239
+ #
240
+ # Instead of creating a Git::Base directly, obtain a Git::Base instance by
241
+ # calling one of the follow {Git} class methods: {Git.open}, {Git.init},
242
+ # {Git.clone}, or {Git.bare}.
243
+ #
244
+ # source://git//lib/git/base/factory.rb#3
245
+ class Git::Base
246
+ include ::Git::Base::Factory
247
+
248
+ # Create an object that executes Git commands in the context of a working
249
+ # copy or a bare repository.
250
+ #
251
+ # @option options
252
+ # @option options
253
+ # @option options
254
+ # @option options
255
+ # @param options [Hash] The options for this command (see list of valid
256
+ # options below)
257
+ # @return [Git::Base] an object that can execute git commands in the context
258
+ # of the opened working copy or bare repository
259
+ #
260
+ # source://git//lib/git/base.rb#88
261
+ def initialize(options = T.unsafe(nil)); end
262
+
263
+ # updates the repository index using the working directory content
264
+ #
265
+ # options:
266
+ # :all => true
267
+ #
268
+ # @example
269
+ # git.add
270
+ # git.add('path/to/file')
271
+ # git.add(['path/to/file1','path/to/file2'])
272
+ # git.add(:all => true)
273
+ # @option options
274
+ # @param paths [String, Array] files paths to be added (optional, default='.')
275
+ # @param options [Hash]
276
+ #
277
+ # source://git//lib/git/base.rb#247
278
+ def add(paths = T.unsafe(nil), **options); end
279
+
280
+ # adds a new remote to this repository
281
+ # url can be a git url or a Git::Base object if it's a local reference
282
+ #
283
+ # @git.add_remote('scotts_git', 'git://repo.or.cz/rubygit.git')
284
+ # @git.fetch('scotts_git')
285
+ # @git.merge('scotts_git/master')
286
+ #
287
+ # Options:
288
+ # :fetch => true
289
+ # :track => <branch_name>
290
+ #
291
+ # source://git//lib/git/base.rb#392
292
+ def add_remote(name, url, opts = T.unsafe(nil)); end
293
+
294
+ # Creates a new git tag (Git::Tag)
295
+ #
296
+ # @example
297
+ # repo.add_tag('tag_name', object_reference)
298
+ # repo.add_tag('tag_name', object_reference, {:options => 'here'})
299
+ # repo.add_tag('tag_name', {:options => 'here'})
300
+ # @option options
301
+ # @option options
302
+ # @option options
303
+ # @option options
304
+ # @option options
305
+ # @option options
306
+ # @option options
307
+ # @param name [String] The name of the tag to add
308
+ # @param options [Hash] Opstions to pass to `git tag`.
309
+ # See [git-tag](https://git-scm.com/docs/git-tag) for more details.
310
+ #
311
+ # source://git//lib/git/base.rb#439
312
+ def add_tag(name, *options); end
313
+
314
+ # source://git//lib/git/base.rb#463
315
+ def apply(file); end
316
+
317
+ # source://git//lib/git/base.rb#469
318
+ def apply_mail(file); end
319
+
320
+ # creates an archive file of the given tree-ish
321
+ #
322
+ # source://git//lib/git/base.rb#450
323
+ def archive(treeish, file = T.unsafe(nil), opts = T.unsafe(nil)); end
324
+
325
+ # source://git//lib/git/base.rb#568
326
+ def cat_file(objectish); end
327
+
328
+ # changes current working directory for a block
329
+ # to the git working directory
330
+ #
331
+ # example
332
+ # @git.chdir do
333
+ # # write files
334
+ # @git.add
335
+ # @git.commit('message')
336
+ # end
337
+ #
338
+ # source://git//lib/git/base.rb#114
339
+ def chdir; end
340
+
341
+ # checks out a branch as the new git working directory
342
+ #
343
+ # source://git//lib/git/base.rb#328
344
+ def checkout(branch = T.unsafe(nil), opts = T.unsafe(nil)); end
345
+
346
+ # checks out an old version of a file
347
+ #
348
+ # source://git//lib/git/base.rb#333
349
+ def checkout_file(version, file); end
350
+
351
+ # source://git//lib/git/base.rb#507
352
+ def checkout_index(opts = T.unsafe(nil)); end
353
+
354
+ # cleans the working directory
355
+ #
356
+ # options:
357
+ # :force
358
+ # :d
359
+ # :ff
360
+ #
361
+ # source://git//lib/git/base.rb#274
362
+ def clean(opts = T.unsafe(nil)); end
363
+
364
+ # commits all pending changes in the index file to the git repository
365
+ #
366
+ # options:
367
+ # :all
368
+ # :allow_empty
369
+ # :amend
370
+ # :author
371
+ #
372
+ # source://git//lib/git/base.rb#315
373
+ def commit(message, opts = T.unsafe(nil)); end
374
+
375
+ # commits all pending changes in the index file to the git repository,
376
+ # but automatically adds all modified files without having to explicitly
377
+ # calling @git.add() on them.
378
+ #
379
+ # source://git//lib/git/base.rb#322
380
+ def commit_all(message, opts = T.unsafe(nil)); end
381
+
382
+ # g.config('user.name', 'Scott Chacon') # sets value
383
+ # g.config('user.email', 'email@email.com') # sets value
384
+ # g.config('user.email', 'email@email.com', file: 'path/to/custom/config) # sets value in file
385
+ # g.config('user.name') # returns 'Scott Chacon'
386
+ # g.config # returns whole config hash
387
+ #
388
+ # source://git//lib/git/base.rb#125
389
+ def config(name = T.unsafe(nil), value = T.unsafe(nil), options = T.unsafe(nil)); end
390
+
391
+ # returns the name of the branch the working directory is currently on
392
+ #
393
+ # source://git//lib/git/base.rb#573
394
+ def current_branch; end
395
+
396
+ # deletes a tag
397
+ #
398
+ # source://git//lib/git/base.rb#445
399
+ def delete_tag(name); end
400
+
401
+ # returns the most recent tag that is reachable from a commit
402
+ #
403
+ # options:
404
+ # :all
405
+ # :tags
406
+ # :contains
407
+ # :debug
408
+ # :exact_match
409
+ # :dirty
410
+ # :abbrev
411
+ # :candidates
412
+ # :long
413
+ # :always
414
+ # :match
415
+ #
416
+ # source://git//lib/git/base.rb#293
417
+ def describe(committish = T.unsafe(nil), opts = T.unsafe(nil)); end
418
+
419
+ # returns a reference to the working directory
420
+ # @git.dir.path
421
+ # @git.dir.writeable?
422
+ #
423
+ # source://git//lib/git/base.rb#141
424
+ def dir; end
425
+
426
+ # iterates over the files which are unmerged
427
+ #
428
+ # source://git//lib/git/base.rb#363
429
+ def each_conflict(&block); end
430
+
431
+ # fetches changes from a remote branch - this does not modify the working directory,
432
+ # it just gets the changes from the remote if there are any
433
+ #
434
+ # source://git//lib/git/base.rb#339
435
+ def fetch(remote = T.unsafe(nil), opts = T.unsafe(nil)); end
436
+
437
+ # source://git//lib/git/base.rb#459
438
+ def gc; end
439
+
440
+ # Run a grep for 'string' on the HEAD of the git repository
441
+ #
442
+ # @example Limit grep's scope by calling grep() from a specific object:
443
+ # git.object("v2.3").grep('TODO')
444
+ # @example Using grep results:
445
+ # git.grep("TODO").each do |sha, arr|
446
+ # puts "in blob #{sha}:"
447
+ # arr.each do |line_no, match_string|
448
+ # puts "\t line #{line_no}: '#{match_string}'"
449
+ # end
450
+ # end
451
+ # @return [Hash<String, Array>] a hash of arrays
452
+ # ```Ruby
453
+ # {
454
+ # 'tree-ish1' => [[line_no1, match_string1], ...],
455
+ # 'tree-ish2' => [[line_no1, match_string1], ...],
456
+ # ...
457
+ # }
458
+ # ```
459
+ #
460
+ # source://git//lib/git/base.rb#224
461
+ def grep(string, path_limiter = T.unsafe(nil), opts = T.unsafe(nil)); end
462
+
463
+ # returns reference to the git index file
464
+ #
465
+ # source://git//lib/git/base.rb#146
466
+ def index; end
467
+
468
+ # returns +true+ if the branch exists
469
+ #
470
+ # @return [Boolean]
471
+ #
472
+ # source://git//lib/git/base.rb#190
473
+ def is_branch?(branch); end
474
+
475
+ # returns +true+ if the branch exists locally
476
+ #
477
+ # @return [Boolean]
478
+ #
479
+ # source://git//lib/git/base.rb#178
480
+ def is_local_branch?(branch); end
481
+
482
+ # returns +true+ if the branch exists remotely
483
+ #
484
+ # @return [Boolean]
485
+ #
486
+ # source://git//lib/git/base.rb#184
487
+ def is_remote_branch?(branch); end
488
+
489
+ # this is a convenience method for accessing the class that wraps all the
490
+ # actual 'git' forked system calls. At some point I hope to replace the Git::Lib
491
+ # class with one that uses native methods or libgit C bindings
492
+ #
493
+ # source://git//lib/git/base.rb#198
494
+ def lib; end
495
+
496
+ # source://git//lib/git/base.rb#529
497
+ def ls_files(location = T.unsafe(nil)); end
498
+
499
+ # source://git//lib/git/base.rb#564
500
+ def ls_tree(objectish); end
501
+
502
+ # merges one or more branches into the current working branch
503
+ #
504
+ # you can specify more than one branch to merge by passing an array of branches
505
+ #
506
+ # source://git//lib/git/base.rb#358
507
+ def merge(branch, message = T.unsafe(nil), opts = T.unsafe(nil)); end
508
+
509
+ # pulls the given branch from the given remote into the current branch
510
+ #
511
+ # @git.pull # pulls from origin/master
512
+ # @git.pull('upstream') # pulls from upstream/master
513
+ # @git.pull('upstream', 'develope') # pulls from upstream/develop
514
+ #
515
+ # source://git//lib/git/base.rb#373
516
+ def pull(remote = T.unsafe(nil), branch = T.unsafe(nil)); end
517
+
518
+ # pushes changes to a remote repository - easiest if this is a cloned repository,
519
+ # otherwise you may have to run something like this first to setup the push parameters:
520
+ #
521
+ # @git.config('remote.remote-name.push', 'refs/heads/master:refs/heads/master')
522
+ #
523
+ # source://git//lib/git/base.rb#348
524
+ def push(remote = T.unsafe(nil), branch = T.unsafe(nil), opts = T.unsafe(nil)); end
525
+
526
+ # source://git//lib/git/base.rb#511
527
+ def read_tree(treeish, opts = T.unsafe(nil)); end
528
+
529
+ # returns an array of Git:Remote objects
530
+ #
531
+ # source://git//lib/git/base.rb#378
532
+ def remotes; end
533
+
534
+ # removes file(s) from the git repository
535
+ #
536
+ # source://git//lib/git/base.rb#252
537
+ def remove(path = T.unsafe(nil), opts = T.unsafe(nil)); end
538
+
539
+ # removes a remote from this repository
540
+ #
541
+ # @git.remove_remote('scott_git')
542
+ #
543
+ # source://git//lib/git/base.rb#412
544
+ def remove_remote(name); end
545
+
546
+ # repacks the repository
547
+ #
548
+ # source://git//lib/git/base.rb#455
549
+ def repack; end
550
+
551
+ # returns reference to the git repository directory
552
+ # @git.dir.path
553
+ #
554
+ # source://git//lib/git/base.rb#152
555
+ def repo; end
556
+
557
+ # returns the repository size in bytes
558
+ #
559
+ # source://git//lib/git/base.rb#157
560
+ def repo_size; end
561
+
562
+ # resets the working directory to the provided commitish
563
+ #
564
+ # source://git//lib/git/base.rb#257
565
+ def reset(commitish = T.unsafe(nil), opts = T.unsafe(nil)); end
566
+
567
+ # resets the working directory to the commitish with '--hard'
568
+ #
569
+ # source://git//lib/git/base.rb#262
570
+ def reset_hard(commitish = T.unsafe(nil), opts = T.unsafe(nil)); end
571
+
572
+ # reverts the working directory to the provided commitish.
573
+ # Accepts a range, such as comittish..HEAD
574
+ #
575
+ # options:
576
+ # :no_edit
577
+ #
578
+ # source://git//lib/git/base.rb#303
579
+ def revert(commitish = T.unsafe(nil), opts = T.unsafe(nil)); end
580
+
581
+ # runs git rev-parse to convert the objectish to a full sha
582
+ #
583
+ # @example
584
+ # git.revparse("HEAD^^")
585
+ # git.revparse('v2.4^{tree}')
586
+ # git.revparse('v2.4:/doc/index.html')
587
+ #
588
+ # source://git//lib/git/base.rb#560
589
+ def revparse(objectish); end
590
+
591
+ # source://git//lib/git/base.rb#167
592
+ def set_index(index_file, check = T.unsafe(nil)); end
593
+
594
+ # sets the url for a remote
595
+ # url can be a git url or a Git::Base object if it's a local reference
596
+ #
597
+ # @git.set_remote_url('scotts_git', 'git://repo.or.cz/rubygit.git')
598
+ #
599
+ # source://git//lib/git/base.rb#403
600
+ def set_remote_url(name, url); end
601
+
602
+ # source://git//lib/git/base.rb#172
603
+ def set_working(work_dir, check = T.unsafe(nil)); end
604
+
605
+ # Shows objects
606
+ #
607
+ # @param objectish [String|NilClass] the target object reference (nil == HEAD)
608
+ # @param path [String|NilClass] the path of the file to be shown
609
+ # @return [String] the object information
610
+ #
611
+ # source://git//lib/git/base.rb#478
612
+ def show(objectish = T.unsafe(nil), path = T.unsafe(nil)); end
613
+
614
+ # returns an array of all Git::Tag objects for this repository
615
+ #
616
+ # source://git//lib/git/base.rb#417
617
+ def tags; end
618
+
619
+ # source://git//lib/git/base.rb#524
620
+ def update_ref(branch, commit); end
621
+
622
+ # LOWER LEVEL INDEX OPERATIONS ##
623
+ #
624
+ # source://git//lib/git/base.rb#484
625
+ def with_index(new_index); end
626
+
627
+ # source://git//lib/git/base.rb#492
628
+ def with_temp_index(&blk); end
629
+
630
+ # source://git//lib/git/base.rb#544
631
+ def with_temp_working(&blk); end
632
+
633
+ # :yields: the Git::WorkingDirectory
634
+ #
635
+ # source://git//lib/git/base.rb#533
636
+ def with_working(work_dir); end
637
+
638
+ # source://git//lib/git/base.rb#519
639
+ def write_and_commit_tree(opts = T.unsafe(nil)); end
640
+
641
+ # source://git//lib/git/base.rb#515
642
+ def write_tree; end
643
+
644
+ class << self
645
+ # Open a bare repository
646
+ #
647
+ # Opens a bare repository located in the `git_dir` directory.
648
+ # Since there is no working copy, you can not checkout or commit
649
+ # but you can do most read operations.
650
+ #
651
+ # @example Open a bare repository and retrieve the first commit SHA
652
+ # repository = Git.bare('ruby-git.git')
653
+ # puts repository.log[0].sha #=> "64c6fa011d3287bab9158049c85f3e85718854a0"
654
+ # @option options
655
+ # @param git_dir [Pathname] The path to the bare repository directory
656
+ # containing an initialized Git repository. If a relative path is given, it
657
+ # is converted to an absolute path using
658
+ # [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
659
+ # @param options [Hash] The options for this command (see list of valid
660
+ # options below)
661
+ # @return [Git::Base] an object that can execute git commands in the context
662
+ # of the bare repository.
663
+ # @see https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbarerepositoryabarerepository What is a bare repository?
664
+ #
665
+ # source://git//lib/git/base.rb#14
666
+ def bare(git_dir, options = T.unsafe(nil)); end
667
+
668
+ # Clone a repository into an empty or newly created directory
669
+ #
670
+ # @example Clone into the default directory `ruby-git`
671
+ # git = Git.clone('https://github.com/ruby-git/ruby-git.git')
672
+ # @example Clone and then checkout the `development` branch
673
+ # git = Git.clone('https://github.com/ruby-git/ruby-git.git', branch: 'development')
674
+ # @example Clone into a different directory `my-ruby-git`
675
+ # git = Git.clone('https://github.com/ruby-git/ruby-git.git', 'my-ruby-git')
676
+ # # or:
677
+ # git = Git.clone('https://github.com/ruby-git/ruby-git.git', path: 'my-ruby-git')
678
+ # @example Create a bare repository in the directory `ruby-git.git`
679
+ # git = Git.clone('https://github.com/ruby-git/ruby-git.git', bare: true)
680
+ # @option options
681
+ # @option options
682
+ # @option options
683
+ # @option options
684
+ # @option options
685
+ # @option options
686
+ # @option options
687
+ # @option options
688
+ # @param repository [URI, Pathname] The (possibly remote) repository to clone
689
+ # from. See [GIT URLS](https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a)
690
+ # for more information.
691
+ # @param name [Pathname] The directory to clone into.
692
+ # @param options [Hash] The options for this command (see list of valid
693
+ # options below)
694
+ # @return [Git::Base] an object that can execute git commands in the context
695
+ # of the cloned local working copy or cloned repository.
696
+ # @see https://git-scm.com/docs/git-clone git clone
697
+ # @see https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a GIT URLs
698
+ #
699
+ # source://git//lib/git/base.rb#20
700
+ def clone(repository, name, options = T.unsafe(nil)); end
701
+
702
+ # Returns (and initialize if needed) a Git::Config instance
703
+ #
704
+ # @return [Git::Config] the current config instance.
705
+ #
706
+ # source://git//lib/git/base.rb#29
707
+ def config; end
708
+
709
+ # Create an empty Git repository or reinitialize an existing Git repository
710
+ #
711
+ # @example Initialize a repository in the current directory
712
+ # git = Git.init
713
+ # @example Initialize a repository in some other directory
714
+ # git = Git.init '~/code/ruby-git'
715
+ # @example Initialize a bare repository
716
+ # git = Git.init '~/code/ruby-git.git', bare: true
717
+ # @example Initialize a repository in a non-default location (outside of the working copy)
718
+ # git = Git.init '~/code/ruby-git', repository: '~/code/ruby-git.git'
719
+ # @option options
720
+ # @option options
721
+ # @option options
722
+ # @option options
723
+ # @param directory [Pathname] If the `:bare` option is NOT given or is not
724
+ # `true`, the repository will be created in `"#{directory}/.git"`.
725
+ # Otherwise, the repository is created in `"#{directory}"`.
726
+ #
727
+ # All directories along the path to `directory` are created if they do not exist.
728
+ #
729
+ # A relative path is referenced from the current working directory of the process
730
+ # and converted to an absolute path using
731
+ # [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
732
+ # @param options [Hash] The options for this command (see list of valid
733
+ # options below)
734
+ # @return [Git::Base] an object that can execute git commands in the context
735
+ # of the newly initialized repository
736
+ # @see https://git-scm.com/docs/git-init git init
737
+ #
738
+ # source://git//lib/git/base.rb#34
739
+ def init(directory = T.unsafe(nil), options = T.unsafe(nil)); end
740
+
741
+ # Open a an existing Git working directory
742
+ #
743
+ # Git.open will most likely be the most common way to create
744
+ # a git reference, referring to an existing working directory.
745
+ #
746
+ # If not provided in the options, the library will assume
747
+ # the repository and index are in the default places (`.git/`, `.git/index`).
748
+ #
749
+ # @example Open the Git working directory in the current directory
750
+ # git = Git.open
751
+ # @example Open a Git working directory in some other directory
752
+ # git = Git.open('~/Projects/ruby-git')
753
+ # @example Use a logger to see what is going on
754
+ # logger = Logger.new(STDOUT)
755
+ # git = Git.open('~/Projects/ruby-git', log: logger)
756
+ # @example Open a working copy whose repository is in a non-standard directory
757
+ # git = Git.open('~/Projects/ruby-git', repository: '~/Project/ruby-git.git')
758
+ # @option options
759
+ # @option options
760
+ # @option options
761
+ # @param working_dir [Pathname] the path to the working directory to use
762
+ # for git commands.
763
+ #
764
+ # A relative path is referenced from the current working directory of the process
765
+ # and converted to an absolute path using
766
+ # [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
767
+ # @param options [Hash] The options for this command (see list of valid
768
+ # options below)
769
+ # @return [Git::Base] an object that can execute git commands in the context
770
+ # of the opened working copy
771
+ #
772
+ # source://git//lib/git/base.rb#61
773
+ def open(working_dir, options = T.unsafe(nil)); end
774
+
775
+ private
776
+
777
+ # Normalize options[:index]
778
+ #
779
+ # If options[:index] is a relative directory, convert it to an absolute
780
+ # directory relative to the repository directory
781
+ #
782
+ # source://git//lib/git/base.rb#661
783
+ def normalize_index(options); end
784
+
785
+ # Normalize options before they are sent to Git::Base.new
786
+ #
787
+ # Updates the options parameter by setting appropriate values for the following keys:
788
+ # * options[:working_directory]
789
+ # * options[:repository]
790
+ # * options[:index]
791
+ #
792
+ # All three values will be set to absolute paths. An exception is that
793
+ # :working_directory will be set to nil if bare is true.
794
+ #
795
+ # source://git//lib/git/base.rb#589
796
+ def normalize_paths(options, default_working_directory: T.unsafe(nil), default_repository: T.unsafe(nil), bare: T.unsafe(nil)); end
797
+
798
+ # Normalize options[:repository]
799
+ #
800
+ # If working with a bare repository, set to the first non-nil value out of:
801
+ # 1. `options[:repository]`
802
+ # 2. the `default` parameter
803
+ # 3. the current working directory
804
+ #
805
+ # Otherwise, set to the first non-nil value of:
806
+ # 1. `options[:repository]`
807
+ # 2. `.git`
808
+ #
809
+ # Next, if options[:repository] refers to a *file* and not a *directory*, set
810
+ # options[:repository] to the contents of that file. This is the case when
811
+ # working with a submodule or a secondary working tree (created with git worktree
812
+ # add). In these cases the repository is actually contained/nested within the
813
+ # parent's repository directory.
814
+ #
815
+ # Finally, if options[:repository] is a relative path, convert it to an absolute
816
+ # path relative to:
817
+ # 1. the current directory if working with a bare repository or
818
+ # 2. the working directory if NOT working with a bare repository
819
+ #
820
+ # source://git//lib/git/base.rb#641
821
+ def normalize_repository(options, default:, bare: T.unsafe(nil)); end
822
+
823
+ # Normalize options[:working_directory]
824
+ #
825
+ # If working with a bare repository, set to `nil`.
826
+ # Otherwise, set to the first non-nil value of:
827
+ # 1. `options[:working_directory]`,
828
+ # 2. the `default` parameter, or
829
+ # 3. the current working directory
830
+ #
831
+ # Finally, if options[:working_directory] is a relative path, convert it to an absoluite
832
+ # path relative to the current directory.
833
+ #
834
+ # source://git//lib/git/base.rb#608
835
+ def normalize_working_directory(options, default:, bare: T.unsafe(nil)); end
836
+ end
837
+ end
838
+
839
+ # source://git//lib/git/base/factory.rb#5
840
+ module Git::Base::Factory
841
+ # @return [Git::Branch] an object for branch_name
842
+ #
843
+ # source://git//lib/git/base/factory.rb#8
844
+ def branch(branch_name = T.unsafe(nil)); end
845
+
846
+ # @return [Git::Branches] a collection of all the branches in the repository.
847
+ # Each branch is represented as a {Git::Branch}.
848
+ #
849
+ # source://git//lib/git/base/factory.rb#14
850
+ def branches; end
851
+
852
+ # @return [Git::Object::Commit] a commit object
853
+ #
854
+ # source://git//lib/git/base/factory.rb#30
855
+ def commit_tree(tree = T.unsafe(nil), opts = T.unsafe(nil)); end
856
+
857
+ # @return [Git::Diff] a Git::Diff object
858
+ #
859
+ # source://git//lib/git/base/factory.rb#35
860
+ def diff(objectish = T.unsafe(nil), obj2 = T.unsafe(nil)); end
861
+
862
+ # @return [Git::Object] a Git object
863
+ #
864
+ # source://git//lib/git/base/factory.rb#40
865
+ def gblob(objectish); end
866
+
867
+ # @return [Git::Object] a Git object
868
+ #
869
+ # source://git//lib/git/base/factory.rb#45
870
+ def gcommit(objectish); end
871
+
872
+ # @return [Git::Object] a Git object
873
+ #
874
+ # source://git//lib/git/base/factory.rb#50
875
+ def gtree(objectish); end
876
+
877
+ # @return [Git::Log] a log with the specified number of commits
878
+ #
879
+ # source://git//lib/git/base/factory.rb#55
880
+ def log(count = T.unsafe(nil)); end
881
+
882
+ # Find as good common ancestors as possible for a merge
883
+ # example: g.merge_base('master', 'some_branch', 'some_sha', octopus: true)
884
+ #
885
+ # @return [Array<Git::Object::Commit>] a collection of common ancestors
886
+ #
887
+ # source://git//lib/git/base/factory.rb#92
888
+ def merge_base(*args); end
889
+
890
+ # returns a Git::Object of the appropriate type
891
+ # you can also call @git.gtree('tree'), but that's
892
+ # just for readability. If you call @git.gtree('HEAD') it will
893
+ # still return a Git::Object::Commit object.
894
+ #
895
+ # object calls a factory method that will run a rev-parse
896
+ # on the objectish and determine the type of the object and return
897
+ # an appropriate object for that type
898
+ #
899
+ # @return [Git::Object] an instance of the appropriate type of Git::Object
900
+ #
901
+ # source://git//lib/git/base/factory.rb#69
902
+ def object(objectish); end
903
+
904
+ # @return [Git::Remote] a remote of the specified name
905
+ #
906
+ # source://git//lib/git/base/factory.rb#74
907
+ def remote(remote_name = T.unsafe(nil)); end
908
+
909
+ # @return [Git::Status] a status object
910
+ #
911
+ # source://git//lib/git/base/factory.rb#79
912
+ def status; end
913
+
914
+ # @return [Git::Object::Tag] a tag object
915
+ #
916
+ # source://git//lib/git/base/factory.rb#84
917
+ def tag(tag_name); end
918
+
919
+ # returns a Git::Worktree object for dir, commitish
920
+ #
921
+ # source://git//lib/git/base/factory.rb#19
922
+ def worktree(dir, commitish = T.unsafe(nil)); end
923
+
924
+ # returns a Git::worktrees object of all the Git::Worktrees
925
+ # objects for this repo
926
+ #
927
+ # source://git//lib/git/base/factory.rb#25
928
+ def worktrees; end
929
+ end
930
+
931
+ # source://git//lib/git/branch.rb#5
932
+ class Git::Branch < ::Git::Path
933
+ # @return [Branch] a new instance of Branch
934
+ #
935
+ # source://git//lib/git/branch.rb#9
936
+ def initialize(base, name); end
937
+
938
+ # source://git//lib/git/branch.rb#31
939
+ def archive(file, opts = T.unsafe(nil)); end
940
+
941
+ # source://git//lib/git/branch.rb#26
942
+ def checkout; end
943
+
944
+ # @return [Boolean]
945
+ #
946
+ # source://git//lib/git/branch.rb#63
947
+ def contains?(commit); end
948
+
949
+ # source://git//lib/git/branch.rb#51
950
+ def create; end
951
+
952
+ # source://git//lib/git/branch.rb#59
953
+ def current; end
954
+
955
+ # source://git//lib/git/branch.rb#55
956
+ def delete; end
957
+
958
+ # Returns the value of attribute full.
959
+ #
960
+ # source://git//lib/git/branch.rb#7
961
+ def full; end
962
+
963
+ # Sets the attribute full
964
+ #
965
+ # @param value the value to set the attribute full to.
966
+ #
967
+ # source://git//lib/git/branch.rb#7
968
+ def full=(_arg0); end
969
+
970
+ # source://git//lib/git/branch.rb#17
971
+ def gcommit; end
972
+
973
+ # g.branch('new_branch').in_branch do
974
+ # # create new file
975
+ # # do other stuff
976
+ # return true # auto commits and switches back
977
+ # end
978
+ #
979
+ # source://git//lib/git/branch.rb#40
980
+ def in_branch(message = T.unsafe(nil)); end
981
+
982
+ # source://git//lib/git/branch.rb#67
983
+ def merge(branch = T.unsafe(nil), message = T.unsafe(nil)); end
984
+
985
+ # Returns the value of attribute name.
986
+ #
987
+ # source://git//lib/git/branch.rb#7
988
+ def name; end
989
+
990
+ # Sets the attribute name
991
+ #
992
+ # @param value the value to set the attribute name to.
993
+ #
994
+ # source://git//lib/git/branch.rb#7
995
+ def name=(_arg0); end
996
+
997
+ # Returns the value of attribute remote.
998
+ #
999
+ # source://git//lib/git/branch.rb#7
1000
+ def remote; end
1001
+
1002
+ # Sets the attribute remote
1003
+ #
1004
+ # @param value the value to set the attribute remote to.
1005
+ #
1006
+ # source://git//lib/git/branch.rb#7
1007
+ def remote=(_arg0); end
1008
+
1009
+ # source://git//lib/git/branch.rb#22
1010
+ def stashes; end
1011
+
1012
+ # source://git//lib/git/branch.rb#84
1013
+ def to_a; end
1014
+
1015
+ # source://git//lib/git/branch.rb#88
1016
+ def to_s; end
1017
+
1018
+ # source://git//lib/git/branch.rb#80
1019
+ def update_ref(commit); end
1020
+
1021
+ private
1022
+
1023
+ # source://git//lib/git/branch.rb#94
1024
+ def check_if_create; end
1025
+
1026
+ # source://git//lib/git/branch.rb#98
1027
+ def determine_current; end
1028
+
1029
+ # Given a full branch name return an Array containing the remote and branch names.
1030
+ #
1031
+ # Removes 'remotes' from the beggining of the name (if present).
1032
+ # Takes the second part (splittign by '/') as the remote name.
1033
+ # Takes the rest as the repo name (can also hold one or more '/').
1034
+ #
1035
+ # Example:
1036
+ # parse_name('master') #=> [nil, 'master']
1037
+ # parse_name('origin/master') #=> ['origin', 'master']
1038
+ # parse_name('remotes/origin/master') #=> ['origin', 'master']
1039
+ # parse_name('origin/master/v2') #=> ['origin', 'master/v2']
1040
+ #
1041
+ # param [String] name branch full name.
1042
+ # return [<Git::Remote,NilClass,String>] an Array containing the remote and branch names.
1043
+ #
1044
+ # source://git//lib/git/branch.rb#116
1045
+ def parse_name(name); end
1046
+ end
1047
+
1048
+ # object that holds all the available branches
1049
+ #
1050
+ # source://git//lib/git/branches.rb#4
1051
+ class Git::Branches
1052
+ include ::Enumerable
1053
+
1054
+ # @return [Branches] a new instance of Branches
1055
+ #
1056
+ # source://git//lib/git/branches.rb#8
1057
+ def initialize(base); end
1058
+
1059
+ # Returns the target branch
1060
+ #
1061
+ # Example:
1062
+ # Given (git branch -a):
1063
+ # master
1064
+ # remotes/working/master
1065
+ #
1066
+ # g.branches['master'].full #=> 'master'
1067
+ # g.branches['working/master'].full => 'remotes/working/master'
1068
+ # g.branches['remotes/working/master'].full => 'remotes/working/master'
1069
+ #
1070
+ # @param branch_name [#to_s] the target branch name.
1071
+ # @return [Git::Branch] the target branch.
1072
+ #
1073
+ # source://git//lib/git/branches.rb#49
1074
+ def [](branch_name); end
1075
+
1076
+ # source://git//lib/git/branches.rb#32
1077
+ def each(&block); end
1078
+
1079
+ # source://git//lib/git/branches.rb#18
1080
+ def local; end
1081
+
1082
+ # source://git//lib/git/branches.rb#22
1083
+ def remote; end
1084
+
1085
+ # array like methods
1086
+ #
1087
+ # source://git//lib/git/branches.rb#28
1088
+ def size; end
1089
+
1090
+ # source://git//lib/git/branches.rb#61
1091
+ def to_s; end
1092
+ end
1093
+
1094
+ # source://git//lib/git/config.rb#3
1095
+ class Git::Config
1096
+ # @return [Config] a new instance of Config
1097
+ #
1098
+ # source://git//lib/git/config.rb#7
1099
+ def initialize; end
1100
+
1101
+ # source://git//lib/git/config.rb#12
1102
+ def binary_path; end
1103
+
1104
+ # Sets the attribute binary_path
1105
+ #
1106
+ # @param value the value to set the attribute binary_path to.
1107
+ #
1108
+ # source://git//lib/git/config.rb#5
1109
+ def binary_path=(_arg0); end
1110
+
1111
+ # source://git//lib/git/config.rb#16
1112
+ def git_ssh; end
1113
+
1114
+ # Sets the attribute git_ssh
1115
+ #
1116
+ # @param value the value to set the attribute git_ssh to.
1117
+ #
1118
+ # source://git//lib/git/config.rb#5
1119
+ def git_ssh=(_arg0); end
1120
+ end
1121
+
1122
+ # object that holds the last X commits on given branch
1123
+ #
1124
+ # source://git//lib/git/diff.rb#4
1125
+ class Git::Diff
1126
+ include ::Enumerable
1127
+
1128
+ # @return [Diff] a new instance of Diff
1129
+ #
1130
+ # source://git//lib/git/diff.rb#7
1131
+ def initialize(base, from = T.unsafe(nil), to = T.unsafe(nil)); end
1132
+
1133
+ # enumerable methods
1134
+ #
1135
+ # source://git//lib/git/diff.rb#62
1136
+ def [](key); end
1137
+
1138
+ # source://git//lib/git/diff.rb#38
1139
+ def deletions; end
1140
+
1141
+ # :yields: each Git::DiffFile in turn
1142
+ #
1143
+ # source://git//lib/git/diff.rb#67
1144
+ def each(&block); end
1145
+
1146
+ # Returns the value of attribute from.
1147
+ #
1148
+ # source://git//lib/git/diff.rb#17
1149
+ def from; end
1150
+
1151
+ # source://git//lib/git/diff.rb#43
1152
+ def insertions; end
1153
+
1154
+ # source://git//lib/git/diff.rb#33
1155
+ def lines; end
1156
+
1157
+ # source://git//lib/git/diff.rb#19
1158
+ def name_status; end
1159
+
1160
+ # if file is provided and is writable, it will write the patch into the file
1161
+ #
1162
+ # source://git//lib/git/diff.rb#54
1163
+ def patch(file = T.unsafe(nil)); end
1164
+
1165
+ # source://git//lib/git/diff.rb#23
1166
+ def path(path); end
1167
+
1168
+ # source://git//lib/git/diff.rb#28
1169
+ def size; end
1170
+
1171
+ # source://git//lib/git/diff.rb#48
1172
+ def stats; end
1173
+
1174
+ # Returns the value of attribute to.
1175
+ #
1176
+ # source://git//lib/git/diff.rb#17
1177
+ def to; end
1178
+
1179
+ # if file is provided and is writable, it will write the patch into the file
1180
+ #
1181
+ # source://git//lib/git/diff.rb#54
1182
+ def to_s(file = T.unsafe(nil)); end
1183
+
1184
+ private
1185
+
1186
+ # source://git//lib/git/diff.rb#103
1187
+ def cache_full; end
1188
+
1189
+ # source://git//lib/git/diff.rb#117
1190
+ def cache_name_status; end
1191
+
1192
+ # source://git//lib/git/diff.rb#113
1193
+ def cache_stats; end
1194
+
1195
+ # source://git//lib/git/diff.rb#107
1196
+ def process_full; end
1197
+
1198
+ # break up @diff_full
1199
+ #
1200
+ # source://git//lib/git/diff.rb#122
1201
+ def process_full_diff; end
1202
+ end
1203
+
1204
+ # source://git//lib/git/diff.rb#72
1205
+ class Git::Diff::DiffFile
1206
+ # @return [DiffFile] a new instance of DiffFile
1207
+ #
1208
+ # source://git//lib/git/diff.rb#77
1209
+ def initialize(base, hash); end
1210
+
1211
+ # @return [Boolean]
1212
+ #
1213
+ # source://git//lib/git/diff.rb#88
1214
+ def binary?; end
1215
+
1216
+ # source://git//lib/git/diff.rb#92
1217
+ def blob(type = T.unsafe(nil)); end
1218
+
1219
+ # Returns the value of attribute dst.
1220
+ #
1221
+ # source://git//lib/git/diff.rb#73
1222
+ def dst; end
1223
+
1224
+ # Sets the attribute dst
1225
+ #
1226
+ # @param value the value to set the attribute dst to.
1227
+ #
1228
+ # source://git//lib/git/diff.rb#73
1229
+ def dst=(_arg0); end
1230
+
1231
+ # Returns the value of attribute mode.
1232
+ #
1233
+ # source://git//lib/git/diff.rb#73
1234
+ def mode; end
1235
+
1236
+ # Sets the attribute mode
1237
+ #
1238
+ # @param value the value to set the attribute mode to.
1239
+ #
1240
+ # source://git//lib/git/diff.rb#73
1241
+ def mode=(_arg0); end
1242
+
1243
+ # Returns the value of attribute patch.
1244
+ #
1245
+ # source://git//lib/git/diff.rb#73
1246
+ def patch; end
1247
+
1248
+ # Sets the attribute patch
1249
+ #
1250
+ # @param value the value to set the attribute patch to.
1251
+ #
1252
+ # source://git//lib/git/diff.rb#73
1253
+ def patch=(_arg0); end
1254
+
1255
+ # Returns the value of attribute path.
1256
+ #
1257
+ # source://git//lib/git/diff.rb#73
1258
+ def path; end
1259
+
1260
+ # Sets the attribute path
1261
+ #
1262
+ # @param value the value to set the attribute path to.
1263
+ #
1264
+ # source://git//lib/git/diff.rb#73
1265
+ def path=(_arg0); end
1266
+
1267
+ # Returns the value of attribute src.
1268
+ #
1269
+ # source://git//lib/git/diff.rb#73
1270
+ def src; end
1271
+
1272
+ # Sets the attribute src
1273
+ #
1274
+ # @param value the value to set the attribute src to.
1275
+ #
1276
+ # source://git//lib/git/diff.rb#73
1277
+ def src=(_arg0); end
1278
+
1279
+ # Returns the value of attribute type.
1280
+ #
1281
+ # source://git//lib/git/diff.rb#73
1282
+ def type; end
1283
+
1284
+ # Sets the attribute type
1285
+ #
1286
+ # @param value the value to set the attribute type to.
1287
+ #
1288
+ # source://git//lib/git/diff.rb#73
1289
+ def type=(_arg0); end
1290
+ end
1291
+
1292
+ # source://git//lib/git/diff.rb#75
1293
+ Git::Diff::DiffFile::NIL_BLOB_REGEXP = T.let(T.unsafe(nil), Regexp)
1294
+
1295
+ # Method that can be used to detect and normalize string encoding
1296
+ #
1297
+ # source://git//lib/git/encoding_utils.rb#7
1298
+ module Git::EncodingUtils
1299
+ class << self
1300
+ # source://git//lib/git/encoding_utils.rb#12
1301
+ def best_guess_encoding; end
1302
+
1303
+ # source://git//lib/git/encoding_utils.rb#8
1304
+ def default_encoding; end
1305
+
1306
+ # source://git//lib/git/encoding_utils.rb#17
1307
+ def detected_encoding(str); end
1308
+
1309
+ # source://git//lib/git/encoding_utils.rb#21
1310
+ def encoding_options; end
1311
+
1312
+ # source://git//lib/git/encoding_utils.rb#25
1313
+ def normalize_encoding(str); end
1314
+ end
1315
+ end
1316
+
1317
+ # Represents an escaped Git path string
1318
+ #
1319
+ # Git commands that output paths (e.g. ls-files, diff), will escape usual
1320
+ # characters in the path with backslashes in the same way C escapes control
1321
+ # characters (e.g. \t for TAB, \n for LF, \\ for backslash) or bytes with values
1322
+ # larger than 0x80 (e.g. octal \302\265 for "micro" in UTF-8).
1323
+ #
1324
+ # @example
1325
+ # Git::GitPath.new('\302\265').unescape # => "µ"
1326
+ #
1327
+ # source://git//lib/git/escaped_path.rb#14
1328
+ class Git::EscapedPath
1329
+ # @return [EscapedPath] a new instance of EscapedPath
1330
+ #
1331
+ # source://git//lib/git/escaped_path.rb#31
1332
+ def initialize(path); end
1333
+
1334
+ # Returns the value of attribute path.
1335
+ #
1336
+ # source://git//lib/git/escaped_path.rb#29
1337
+ def path; end
1338
+
1339
+ # Convert an escaped path to an unescaped path
1340
+ #
1341
+ # source://git//lib/git/escaped_path.rb#36
1342
+ def unescape; end
1343
+
1344
+ private
1345
+
1346
+ # source://git//lib/git/escaped_path.rb#66
1347
+ def escaped_path_to_bytes(path); end
1348
+
1349
+ # source://git//lib/git/escaped_path.rb#48
1350
+ def extract_escape(path, index); end
1351
+
1352
+ # source://git//lib/git/escaped_path.rb#44
1353
+ def extract_octal(path, index); end
1354
+
1355
+ # source://git//lib/git/escaped_path.rb#52
1356
+ def extract_single_char(path, index); end
1357
+
1358
+ # source://git//lib/git/escaped_path.rb#56
1359
+ def next_byte(path, index); end
1360
+ end
1361
+
1362
+ # source://git//lib/git/escaped_path.rb#15
1363
+ Git::EscapedPath::UNESCAPES = T.let(T.unsafe(nil), Hash)
1364
+
1365
+ # source://git//lib/git/lib.rb#6
1366
+ class Git::GitExecuteError < ::StandardError; end
1367
+
1368
+ # source://git//lib/git/object.rb#3
1369
+ class Git::GitTagNameDoesNotExist < ::StandardError; end
1370
+
1371
+ # source://git//lib/git/index.rb#2
1372
+ class Git::Index < ::Git::Path; end
1373
+
1374
+ # source://git//lib/git/lib.rb#9
1375
+ class Git::Lib
1376
+ # Create a new Git::Lib object
1377
+ #
1378
+ # @option base
1379
+ # @option base
1380
+ # @option base
1381
+ # @param base [Git::Base, Hash] An object that passes in values for
1382
+ # @git_work_dir, @git_dir, and @git_index_file
1383
+ # @param logger [Logger]
1384
+ # @return [Lib] a new instance of Lib
1385
+ #
1386
+ # source://git//lib/git/lib.rb#50
1387
+ def initialize(base = T.unsafe(nil), logger = T.unsafe(nil)); end
1388
+
1389
+ # updates the repository index using the working directory content
1390
+ #
1391
+ # lib.add('path/to/file')
1392
+ # lib.add(['path/to/file1','path/to/file2'])
1393
+ # lib.add(:all => true)
1394
+ #
1395
+ # options:
1396
+ # :all => true
1397
+ # :force => true
1398
+ #
1399
+ # @param paths [String, Array] files paths to be added to the repository
1400
+ # @param options [Hash]
1401
+ #
1402
+ # source://git//lib/git/lib.rb#611
1403
+ def add(paths = T.unsafe(nil), options = T.unsafe(nil)); end
1404
+
1405
+ # source://git//lib/git/lib.rb#704
1406
+ def apply(patch_file); end
1407
+
1408
+ # source://git//lib/git/lib.rb#710
1409
+ def apply_mail(patch_file); end
1410
+
1411
+ # creates an archive file
1412
+ #
1413
+ # options
1414
+ # :format (zip, tar)
1415
+ # :prefix
1416
+ # :remote
1417
+ # :path
1418
+ #
1419
+ # source://git//lib/git/lib.rb#976
1420
+ def archive(sha, file = T.unsafe(nil), opts = T.unsafe(nil)); end
1421
+
1422
+ # source://git//lib/git/lib.rb#402
1423
+ def branch_contains(commit, branch_name = T.unsafe(nil)); end
1424
+
1425
+ # source://git//lib/git/lib.rb#398
1426
+ def branch_current; end
1427
+
1428
+ # source://git//lib/git/lib.rb#755
1429
+ def branch_delete(branch); end
1430
+
1431
+ # source://git//lib/git/lib.rb#751
1432
+ def branch_new(branch); end
1433
+
1434
+ # source://git//lib/git/lib.rb#349
1435
+ def branches_all; end
1436
+
1437
+ # source://git//lib/git/lib.rb#345
1438
+ def change_head_branch(branch_name); end
1439
+
1440
+ # source://git//lib/git/lib.rb#759
1441
+ def checkout(branch, opts = T.unsafe(nil)); end
1442
+
1443
+ # source://git//lib/git/lib.rb#768
1444
+ def checkout_file(version, file); end
1445
+
1446
+ # source://git//lib/git/lib.rb#959
1447
+ def checkout_index(opts = T.unsafe(nil)); end
1448
+
1449
+ # source://git//lib/git/lib.rb#683
1450
+ def clean(opts = T.unsafe(nil)); end
1451
+
1452
+ # tries to clone the given repo
1453
+ #
1454
+ # accepts options:
1455
+ # :bare:: no working directory
1456
+ # :branch:: name of branch to track (rather than 'master')
1457
+ # :depth:: the number of commits back to pull
1458
+ # :origin:: name of remote (same as remote)
1459
+ # :path:: directory where the repo will be cloned
1460
+ # :remote:: name of remote (rather than 'origin')
1461
+ # :recursive:: after the clone is created, initialize all submodules within, using their default settings.
1462
+ #
1463
+ # TODO - make this work with SSH password or auth_key
1464
+ #
1465
+ # @return [Hash] the options to pass to {Git::Base.new}
1466
+ #
1467
+ # source://git//lib/git/lib.rb#98
1468
+ def clone(repository, name, opts = T.unsafe(nil)); end
1469
+
1470
+ # Takes the commit message with the options and executes the commit command
1471
+ #
1472
+ # accepts options:
1473
+ # :amend
1474
+ # :all
1475
+ # :allow_empty
1476
+ # :author
1477
+ # :date
1478
+ # :no_verify
1479
+ # :allow_empty_message
1480
+ # :gpg_sign
1481
+ #
1482
+ # @param message [String] the commit message to be used
1483
+ # @param opts [Hash] the commit options to be used
1484
+ #
1485
+ # source://git//lib/git/lib.rb#654
1486
+ def commit(message, opts = T.unsafe(nil)); end
1487
+
1488
+ # returns useful array of raw commit object data
1489
+ #
1490
+ # source://git//lib/git/lib.rb#221
1491
+ def commit_data(sha); end
1492
+
1493
+ # source://git//lib/git/lib.rb#942
1494
+ def commit_tree(tree, opts = T.unsafe(nil)); end
1495
+
1496
+ # source://git//lib/git/lib.rb#527
1497
+ def config_get(name); end
1498
+
1499
+ # source://git//lib/git/lib.rb#543
1500
+ def config_list; end
1501
+
1502
+ # source://git//lib/git/lib.rb#517
1503
+ def config_remote(name); end
1504
+
1505
+ # WRITE COMMANDS ##
1506
+ #
1507
+ # source://git//lib/git/lib.rb#587
1508
+ def config_set(name, value, options = T.unsafe(nil)); end
1509
+
1510
+ # :yields: file, your, their
1511
+ #
1512
+ # source://git//lib/git/lib.rb#807
1513
+ def conflicts; end
1514
+
1515
+ # returns the current version of git, as an Array of Fixnums.
1516
+ #
1517
+ # source://git//lib/git/lib.rb#1009
1518
+ def current_command_version; end
1519
+
1520
+ # Returns most recent tag that is reachable from a commit
1521
+ #
1522
+ # accepts options:
1523
+ # :all
1524
+ # :tags
1525
+ # :contains
1526
+ # :debug
1527
+ # :exact_match
1528
+ # :dirty
1529
+ # :abbrev
1530
+ # :candidates
1531
+ # :long
1532
+ # :always
1533
+ # :math
1534
+ #
1535
+ # @param [String|NilClass] committish target commit sha or object name
1536
+ # @param [{Symbol=>Object}] opts the given options
1537
+ # @return [String] the tag name
1538
+ #
1539
+ # source://git//lib/git/lib.rb#151
1540
+ def describe(committish = T.unsafe(nil), opts = T.unsafe(nil)); end
1541
+
1542
+ # compares the index and the working directory
1543
+ #
1544
+ # source://git//lib/git/lib.rb#474
1545
+ def diff_files; end
1546
+
1547
+ # source://git//lib/git/lib.rb#430
1548
+ def diff_full(obj1 = T.unsafe(nil), obj2 = T.unsafe(nil), opts = T.unsafe(nil)); end
1549
+
1550
+ # compares the index and the repository
1551
+ #
1552
+ # source://git//lib/git/lib.rb#479
1553
+ def diff_index(treeish); end
1554
+
1555
+ # source://git//lib/git/lib.rb#459
1556
+ def diff_name_status(reference1 = T.unsafe(nil), reference2 = T.unsafe(nil), opts = T.unsafe(nil)); end
1557
+
1558
+ # source://git//lib/git/lib.rb#439
1559
+ def diff_stats(obj1 = T.unsafe(nil), obj2 = T.unsafe(nil), opts = T.unsafe(nil)); end
1560
+
1561
+ # source://git//lib/git/lib.rb#878
1562
+ def fetch(remote, opts); end
1563
+
1564
+ # source://git//lib/git/lib.rb#184
1565
+ def full_log_commits(opts = T.unsafe(nil)); end
1566
+
1567
+ # source://git//lib/git/lib.rb#337
1568
+ def full_tree(sha); end
1569
+
1570
+ # source://git//lib/git/lib.rb#926
1571
+ def gc; end
1572
+
1573
+ # The path to the Git repository directory. The default is
1574
+ # `"#{git_work_dir}/.git"`.
1575
+ #
1576
+ # @return [Pathname] the Git repository directory.
1577
+ # @see [Git repository](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefrepositoryarepository)
1578
+ #
1579
+ # source://git//lib/git/lib.rb#28
1580
+ def git_dir; end
1581
+
1582
+ # The Git index file used to stage changes (using `git add`) before they
1583
+ # are committed.
1584
+ #
1585
+ # @return [Pathname] the Git index file
1586
+ # @see [Git index file](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefindexaindex)
1587
+ #
1588
+ # source://git//lib/git/lib.rb#37
1589
+ def git_index_file; end
1590
+
1591
+ # The path to the Git working copy. The default is '"./.git"'.
1592
+ #
1593
+ # @return [Pathname] the path to the Git working copy.
1594
+ # @see [Git working tree](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefworkingtreeaworkingtree)
1595
+ #
1596
+ # source://git//lib/git/lib.rb#19
1597
+ def git_work_dir; end
1598
+
1599
+ # source://git//lib/git/lib.rb#539
1600
+ def global_config_get(name); end
1601
+
1602
+ # source://git//lib/git/lib.rb#555
1603
+ def global_config_list; end
1604
+
1605
+ # source://git//lib/git/lib.rb#595
1606
+ def global_config_set(name, value); end
1607
+
1608
+ # returns hash
1609
+ # [tree-ish] = [[line_no, match], [line_no, match2]]
1610
+ # [tree-ish] = [[line_no, match], [line_no, match2]]
1611
+ #
1612
+ # source://git//lib/git/lib.rb#409
1613
+ def grep(string, opts = T.unsafe(nil)); end
1614
+
1615
+ # source://git//lib/git/lib.rb#512
1616
+ def ignored_files; end
1617
+
1618
+ # creates or reinitializes the repository
1619
+ #
1620
+ # options:
1621
+ # :bare
1622
+ # :working_directory
1623
+ # :initial_branch
1624
+ #
1625
+ # source://git//lib/git/lib.rb#75
1626
+ def init(opts = T.unsafe(nil)); end
1627
+
1628
+ # source://git//lib/git/lib.rb#391
1629
+ def list_files(ref_dir); end
1630
+
1631
+ # source://git//lib/git/lib.rb#174
1632
+ def log_commits(opts = T.unsafe(nil)); end
1633
+
1634
+ # source://git//lib/git/lib.rb#483
1635
+ def ls_files(location = T.unsafe(nil)); end
1636
+
1637
+ # source://git//lib/git/lib.rb#495
1638
+ def ls_remote(location = T.unsafe(nil), opts = T.unsafe(nil)); end
1639
+
1640
+ # source://git//lib/git/lib.rb#321
1641
+ def ls_tree(sha); end
1642
+
1643
+ # @return [Boolean]
1644
+ #
1645
+ # source://git//lib/git/lib.rb#1019
1646
+ def meets_required_version?; end
1647
+
1648
+ # source://git//lib/git/lib.rb#775
1649
+ def merge(branch, message = T.unsafe(nil), opts = T.unsafe(nil)); end
1650
+
1651
+ # source://git//lib/git/lib.rb#784
1652
+ def merge_base(*args); end
1653
+
1654
+ # source://git//lib/git/lib.rb#333
1655
+ def mv(file1, file2); end
1656
+
1657
+ # source://git//lib/git/lib.rb#208
1658
+ def namerev(string); end
1659
+
1660
+ # source://git//lib/git/lib.rb#317
1661
+ def object_contents(sha, &block); end
1662
+
1663
+ # source://git//lib/git/lib.rb#216
1664
+ def object_size(sha); end
1665
+
1666
+ # source://git//lib/git/lib.rb#212
1667
+ def object_type(sha); end
1668
+
1669
+ # source://git//lib/git/lib.rb#568
1670
+ def parse_config(file); end
1671
+
1672
+ # source://git//lib/git/lib.rb#559
1673
+ def parse_config_list(lines); end
1674
+
1675
+ # source://git//lib/git/lib.rb#227
1676
+ def process_commit_data(data, sha = T.unsafe(nil), indent = T.unsafe(nil)); end
1677
+
1678
+ # source://git//lib/git/lib.rb#276
1679
+ def process_commit_log_data(data); end
1680
+
1681
+ # source://git//lib/git/lib.rb#257
1682
+ def process_tag_data(data, name, indent = T.unsafe(nil)); end
1683
+
1684
+ # source://git//lib/git/lib.rb#911
1685
+ def pull(remote = T.unsafe(nil), branch = T.unsafe(nil)); end
1686
+
1687
+ # source://git//lib/git/lib.rb#893
1688
+ def push(remote, branch = T.unsafe(nil), opts = T.unsafe(nil)); end
1689
+
1690
+ # reads a tree into the current index file
1691
+ #
1692
+ # source://git//lib/git/lib.rb#931
1693
+ def read_tree(treeish, opts = T.unsafe(nil)); end
1694
+
1695
+ # source://git//lib/git/lib.rb#822
1696
+ def remote_add(name, url, opts = T.unsafe(nil)); end
1697
+
1698
+ # source://git//lib/git/lib.rb#841
1699
+ def remote_remove(name); end
1700
+
1701
+ # source://git//lib/git/lib.rb#833
1702
+ def remote_set_url(name, url); end
1703
+
1704
+ # source://git//lib/git/lib.rb#845
1705
+ def remotes; end
1706
+
1707
+ # source://git//lib/git/lib.rb#626
1708
+ def remove(path = T.unsafe(nil), opts = T.unsafe(nil)); end
1709
+
1710
+ # source://git//lib/git/lib.rb#922
1711
+ def repack; end
1712
+
1713
+ # source://git//lib/git/lib.rb#1015
1714
+ def required_command_version; end
1715
+
1716
+ # source://git//lib/git/lib.rb#676
1717
+ def reset(commit, opts = T.unsafe(nil)); end
1718
+
1719
+ # source://git//lib/git/lib.rb#121
1720
+ def return_base_opts_from_clone(clone_dir, opts); end
1721
+
1722
+ # source://git//lib/git/lib.rb#693
1723
+ def revert(commitish, opts = T.unsafe(nil)); end
1724
+
1725
+ # source://git//lib/git/lib.rb#197
1726
+ def revparse(string); end
1727
+
1728
+ # Shows objects
1729
+ #
1730
+ # @param objectish [String|NilClass] the target object reference (nil == HEAD)
1731
+ # @param path [String|NilClass] the path of the file to be shown
1732
+ # @return [String] the object information
1733
+ #
1734
+ # source://git//lib/git/lib.rb#577
1735
+ def show(objectish = T.unsafe(nil), path = T.unsafe(nil)); end
1736
+
1737
+ # source://git//lib/git/lib.rb#735
1738
+ def stash_apply(id = T.unsafe(nil)); end
1739
+
1740
+ # source://git//lib/git/lib.rb#743
1741
+ def stash_clear; end
1742
+
1743
+ # source://git//lib/git/lib.rb#747
1744
+ def stash_list; end
1745
+
1746
+ # source://git//lib/git/lib.rb#730
1747
+ def stash_save(message); end
1748
+
1749
+ # source://git//lib/git/lib.rb#716
1750
+ def stashes_all; end
1751
+
1752
+ # source://git//lib/git/lib.rb#853
1753
+ def tag(name, *opts); end
1754
+
1755
+ # source://git//lib/git/lib.rb#251
1756
+ def tag_data(name); end
1757
+
1758
+ # source://git//lib/git/lib.rb#915
1759
+ def tag_sha(tag_name); end
1760
+
1761
+ # source://git//lib/git/lib.rb#849
1762
+ def tags; end
1763
+
1764
+ # source://git//lib/git/lib.rb#341
1765
+ def tree_depth(sha); end
1766
+
1767
+ # source://git//lib/git/lib.rb#799
1768
+ def unmerged; end
1769
+
1770
+ # source://git//lib/git/lib.rb#955
1771
+ def update_ref(branch, commit); end
1772
+
1773
+ # source://git//lib/git/lib.rb#378
1774
+ def worktree_add(dir, commitish = T.unsafe(nil)); end
1775
+
1776
+ # source://git//lib/git/lib.rb#387
1777
+ def worktree_prune; end
1778
+
1779
+ # source://git//lib/git/lib.rb#383
1780
+ def worktree_remove(dir); end
1781
+
1782
+ # source://git//lib/git/lib.rb#358
1783
+ def worktrees_all; end
1784
+
1785
+ # source://git//lib/git/lib.rb#938
1786
+ def write_tree; end
1787
+
1788
+ private
1789
+
1790
+ # @raise [Git::GitExecuteError]
1791
+ #
1792
+ # source://git//lib/git/lib.rb#1078
1793
+ def command(cmd, *opts, &block); end
1794
+
1795
+ # source://git//lib/git/lib.rb#1031
1796
+ def command_lines(cmd, *opts); end
1797
+
1798
+ # Takes the diff command line output (as Array) and parse it into a Hash
1799
+ #
1800
+ # @param diff_command [String] the diff commadn to be used
1801
+ # @param opts [Array] the diff options to be used
1802
+ # @return [Hash] the diff as Hash
1803
+ #
1804
+ # source://git//lib/git/lib.rb#1131
1805
+ def diff_as_hash(diff_command, opts = T.unsafe(nil)); end
1806
+
1807
+ # source://git//lib/git/lib.rb#1188
1808
+ def escape(s); end
1809
+
1810
+ # source://git//lib/git/lib.rb#1192
1811
+ def escape_for_sh(s); end
1812
+
1813
+ # source://git//lib/git/lib.rb#1196
1814
+ def escape_for_windows(s); end
1815
+
1816
+ # Returns an array holding the common options for the log commands
1817
+ #
1818
+ # @param opts [Hash] the given options
1819
+ # @return [Array] the set of common options that the log command will use
1820
+ #
1821
+ # source://git//lib/git/lib.rb#1155
1822
+ def log_common_options(opts); end
1823
+
1824
+ # Retrurns an array holding path options for the log commands
1825
+ #
1826
+ # @param opts [Hash] the given options
1827
+ # @return [Array] the set of path options that the log command will use
1828
+ #
1829
+ # source://git//lib/git/lib.rb#1174
1830
+ def log_path_options(opts); end
1831
+
1832
+ # Takes the previously stored git's ENV variables and set them again on ENV.
1833
+ #
1834
+ # source://git//lib/git/lib.rb#1050
1835
+ def restore_git_system_env_variables; end
1836
+
1837
+ # source://git//lib/git/lib.rb#1182
1838
+ def run_command(git_cmd, &block); end
1839
+
1840
+ # Sets git's ENV variables to the custom values for the current instance.
1841
+ #
1842
+ # source://git//lib/git/lib.rb#1057
1843
+ def set_custom_git_env_variables; end
1844
+
1845
+ # Takes the current git's system ENV variables and store them.
1846
+ #
1847
+ # source://git//lib/git/lib.rb#1042
1848
+ def store_git_system_env_variables; end
1849
+
1850
+ # @return [Boolean]
1851
+ #
1852
+ # source://git//lib/git/lib.rb#1202
1853
+ def windows_platform?; end
1854
+
1855
+ # Runs a block inside an environment with customized ENV variables.
1856
+ # It restores the ENV after execution.
1857
+ #
1858
+ # @param block [Proc] block to be executed within the customized environment
1859
+ #
1860
+ # source://git//lib/git/lib.rb#1068
1861
+ def with_custom_env_variables(&block); end
1862
+ end
1863
+
1864
+ # Systen ENV variables involved in the git commands.
1865
+ #
1866
+ # @return [<String>] the names of the EVN variables involved in the git commands
1867
+ #
1868
+ # source://git//lib/git/lib.rb#1029
1869
+ Git::Lib::ENV_VARIABLE_NAMES = T.let(T.unsafe(nil), Array)
1870
+
1871
+ # object that holds the last X commits on given branch
1872
+ #
1873
+ # source://git//lib/git/log.rb#4
1874
+ class Git::Log
1875
+ include ::Enumerable
1876
+
1877
+ # @return [Log] a new instance of Log
1878
+ #
1879
+ # source://git//lib/git/log.rb#7
1880
+ def initialize(base, count = T.unsafe(nil)); end
1881
+
1882
+ # source://git//lib/git/log.rb#105
1883
+ def [](index); end
1884
+
1885
+ # source://git//lib/git/log.rb#30
1886
+ def author(regex); end
1887
+
1888
+ # source://git//lib/git/log.rb#66
1889
+ def between(sha1, sha2 = T.unsafe(nil)); end
1890
+
1891
+ # source://git//lib/git/log.rb#72
1892
+ def cherry; end
1893
+
1894
+ # source://git//lib/git/log.rb#90
1895
+ def each(&block); end
1896
+
1897
+ # source://git//lib/git/log.rb#95
1898
+ def first; end
1899
+
1900
+ # source://git//lib/git/log.rb#36
1901
+ def grep(regex); end
1902
+
1903
+ # source://git//lib/git/log.rb#100
1904
+ def last; end
1905
+
1906
+ # source://git//lib/git/log.rb#24
1907
+ def object(objectish); end
1908
+
1909
+ # source://git//lib/git/log.rb#42
1910
+ def path(path); end
1911
+
1912
+ # source://git//lib/git/log.rb#54
1913
+ def since(date); end
1914
+
1915
+ # forces git log to run
1916
+ #
1917
+ # source://git//lib/git/log.rb#85
1918
+ def size; end
1919
+
1920
+ # source://git//lib/git/log.rb#48
1921
+ def skip(num); end
1922
+
1923
+ # source://git//lib/git/log.rb#78
1924
+ def to_s; end
1925
+
1926
+ # source://git//lib/git/log.rb#60
1927
+ def until(date); end
1928
+
1929
+ private
1930
+
1931
+ # source://git//lib/git/log.rb#117
1932
+ def check_log; end
1933
+
1934
+ # source://git//lib/git/log.rb#113
1935
+ def dirty_log; end
1936
+
1937
+ # actually run the 'git log' command
1938
+ #
1939
+ # source://git//lib/git/log.rb#125
1940
+ def run_log; end
1941
+ end
1942
+
1943
+ # represents a git object
1944
+ #
1945
+ # source://git//lib/git/object.rb#7
1946
+ class Git::Object
1947
+ class << self
1948
+ # if we're calling this, we don't know what type it is yet
1949
+ # so this is our little factory method
1950
+ #
1951
+ # source://git//lib/git/object.rb#292
1952
+ def new(base, objectish, type = T.unsafe(nil), is_tag = T.unsafe(nil)); end
1953
+ end
1954
+ end
1955
+
1956
+ # source://git//lib/git/object.rb#9
1957
+ class Git::Object::AbstractObject
1958
+ # @return [AbstractObject] a new instance of AbstractObject
1959
+ #
1960
+ # source://git//lib/git/object.rb#14
1961
+ def initialize(base, objectish); end
1962
+
1963
+ # creates an archive of this object (tree)
1964
+ #
1965
+ # source://git//lib/git/object.rb#67
1966
+ def archive(file = T.unsafe(nil), opts = T.unsafe(nil)); end
1967
+
1968
+ # @return [Boolean]
1969
+ #
1970
+ # source://git//lib/git/object.rb#73
1971
+ def blob?; end
1972
+
1973
+ # @return [Boolean]
1974
+ #
1975
+ # source://git//lib/git/object.rb#75
1976
+ def commit?; end
1977
+
1978
+ # Get the object's contents.
1979
+ # If no block is given, the contents are cached in memory and returned as a string.
1980
+ # If a block is given, it yields an IO object (via IO::popen) which could be used to
1981
+ # read a large file in chunks.
1982
+ #
1983
+ # Use this for large files so that they are not held in memory.
1984
+ #
1985
+ # source://git//lib/git/object.rb#37
1986
+ def contents(&block); end
1987
+
1988
+ # source://git//lib/git/object.rb#45
1989
+ def contents_array; end
1990
+
1991
+ # source://git//lib/git/object.rb#58
1992
+ def diff(objectish); end
1993
+
1994
+ # source://git//lib/git/object.rb#53
1995
+ def grep(string, path_limiter = T.unsafe(nil), opts = T.unsafe(nil)); end
1996
+
1997
+ # source://git//lib/git/object.rb#62
1998
+ def log(count = T.unsafe(nil)); end
1999
+
2000
+ # Returns the value of attribute mode.
2001
+ #
2002
+ # source://git//lib/git/object.rb#10
2003
+ def mode; end
2004
+
2005
+ # Sets the attribute mode
2006
+ #
2007
+ # @param value the value to set the attribute mode to.
2008
+ #
2009
+ # source://git//lib/git/object.rb#10
2010
+ def mode=(_arg0); end
2011
+
2012
+ # Returns the value of attribute objectish.
2013
+ #
2014
+ # source://git//lib/git/object.rb#10
2015
+ def objectish; end
2016
+
2017
+ # Sets the attribute objectish
2018
+ #
2019
+ # @param value the value to set the attribute objectish to.
2020
+ #
2021
+ # source://git//lib/git/object.rb#10
2022
+ def objectish=(_arg0); end
2023
+
2024
+ # source://git//lib/git/object.rb#23
2025
+ def sha; end
2026
+
2027
+ # source://git//lib/git/object.rb#27
2028
+ def size; end
2029
+
2030
+ # Sets the attribute size
2031
+ #
2032
+ # @param value the value to set the attribute size to.
2033
+ #
2034
+ # source://git//lib/git/object.rb#12
2035
+ def size=(_arg0); end
2036
+
2037
+ # @return [Boolean]
2038
+ #
2039
+ # source://git//lib/git/object.rb#77
2040
+ def tag?; end
2041
+
2042
+ # source://git//lib/git/object.rb#49
2043
+ def to_s; end
2044
+
2045
+ # @return [Boolean]
2046
+ #
2047
+ # source://git//lib/git/object.rb#71
2048
+ def tree?; end
2049
+
2050
+ # Returns the value of attribute type.
2051
+ #
2052
+ # source://git//lib/git/object.rb#10
2053
+ def type; end
2054
+
2055
+ # Sets the attribute type
2056
+ #
2057
+ # @param value the value to set the attribute type to.
2058
+ #
2059
+ # source://git//lib/git/object.rb#10
2060
+ def type=(_arg0); end
2061
+ end
2062
+
2063
+ # source://git//lib/git/object.rb#82
2064
+ class Git::Object::Blob < ::Git::Object::AbstractObject
2065
+ # @return [Blob] a new instance of Blob
2066
+ #
2067
+ # source://git//lib/git/object.rb#84
2068
+ def initialize(base, sha, mode = T.unsafe(nil)); end
2069
+
2070
+ # @return [Boolean]
2071
+ #
2072
+ # source://git//lib/git/object.rb#89
2073
+ def blob?; end
2074
+ end
2075
+
2076
+ # source://git//lib/git/object.rb#156
2077
+ class Git::Object::Commit < ::Git::Object::AbstractObject
2078
+ # @return [Commit] a new instance of Commit
2079
+ #
2080
+ # source://git//lib/git/object.rb#158
2081
+ def initialize(base, sha, init = T.unsafe(nil)); end
2082
+
2083
+ # git author
2084
+ #
2085
+ # source://git//lib/git/object.rb#195
2086
+ def author; end
2087
+
2088
+ # source://git//lib/git/object.rb#200
2089
+ def author_date; end
2090
+
2091
+ # @return [Boolean]
2092
+ #
2093
+ # source://git//lib/git/object.rb#228
2094
+ def commit?; end
2095
+
2096
+ # git author
2097
+ #
2098
+ # source://git//lib/git/object.rb#205
2099
+ def committer; end
2100
+
2101
+ # source://git//lib/git/object.rb#210
2102
+ def committer_date; end
2103
+
2104
+ # source://git//lib/git/object.rb#210
2105
+ def date; end
2106
+
2107
+ # source://git//lib/git/object.rb#215
2108
+ def diff_parent; end
2109
+
2110
+ # source://git//lib/git/object.rb#179
2111
+ def gtree; end
2112
+
2113
+ # source://git//lib/git/object.rb#170
2114
+ def message; end
2115
+
2116
+ # source://git//lib/git/object.rb#175
2117
+ def name; end
2118
+
2119
+ # source://git//lib/git/object.rb#184
2120
+ def parent; end
2121
+
2122
+ # array of all parent commits
2123
+ #
2124
+ # source://git//lib/git/object.rb#189
2125
+ def parents; end
2126
+
2127
+ # source://git//lib/git/object.rb#219
2128
+ def set_commit(data); end
2129
+
2130
+ private
2131
+
2132
+ # see if this object has been initialized and do so if not
2133
+ #
2134
+ # source://git//lib/git/object.rb#235
2135
+ def check_commit; end
2136
+ end
2137
+
2138
+ # source://git//lib/git/object.rb#244
2139
+ class Git::Object::Tag < ::Git::Object::AbstractObject
2140
+ # @return [Tag] a new instance of Tag
2141
+ #
2142
+ # source://git//lib/git/object.rb#247
2143
+ def initialize(base, sha, name); end
2144
+
2145
+ # @return [Boolean]
2146
+ #
2147
+ # source://git//lib/git/object.rb#254
2148
+ def annotated?; end
2149
+
2150
+ # source://git//lib/git/object.rb#258
2151
+ def message; end
2152
+
2153
+ # Returns the value of attribute name.
2154
+ #
2155
+ # source://git//lib/git/object.rb#245
2156
+ def name; end
2157
+
2158
+ # Sets the attribute name
2159
+ #
2160
+ # @param value the value to set the attribute name to.
2161
+ #
2162
+ # source://git//lib/git/object.rb#245
2163
+ def name=(_arg0); end
2164
+
2165
+ # @return [Boolean]
2166
+ #
2167
+ # source://git//lib/git/object.rb#263
2168
+ def tag?; end
2169
+
2170
+ # source://git//lib/git/object.rb#267
2171
+ def tagger; end
2172
+
2173
+ private
2174
+
2175
+ # source://git//lib/git/object.rb#274
2176
+ def check_tag; end
2177
+ end
2178
+
2179
+ # source://git//lib/git/object.rb#95
2180
+ class Git::Object::Tree < ::Git::Object::AbstractObject
2181
+ # @return [Tree] a new instance of Tree
2182
+ #
2183
+ # source://git//lib/git/object.rb#97
2184
+ def initialize(base, sha, mode = T.unsafe(nil)); end
2185
+
2186
+ # source://git//lib/git/object.rb#108
2187
+ def blobs; end
2188
+
2189
+ # source://git//lib/git/object.rb#104
2190
+ def children; end
2191
+
2192
+ # source://git//lib/git/object.rb#123
2193
+ def depth; end
2194
+
2195
+ # source://git//lib/git/object.rb#108
2196
+ def files; end
2197
+
2198
+ # source://git//lib/git/object.rb#119
2199
+ def full_tree; end
2200
+
2201
+ # source://git//lib/git/object.rb#113
2202
+ def subdirectories; end
2203
+
2204
+ # source://git//lib/git/object.rb#113
2205
+ def subtrees; end
2206
+
2207
+ # @return [Boolean]
2208
+ #
2209
+ # source://git//lib/git/object.rb#127
2210
+ def tree?; end
2211
+
2212
+ # source://git//lib/git/object.rb#113
2213
+ def trees; end
2214
+
2215
+ private
2216
+
2217
+ # actually run the git command
2218
+ #
2219
+ # source://git//lib/git/object.rb#134
2220
+ def check_tree; end
2221
+ end
2222
+
2223
+ # source://git//lib/git/path.rb#3
2224
+ class Git::Path
2225
+ # @return [Path] a new instance of Path
2226
+ #
2227
+ # source://git//lib/git/path.rb#7
2228
+ def initialize(path, check_path = T.unsafe(nil)); end
2229
+
2230
+ # Returns the value of attribute path.
2231
+ #
2232
+ # source://git//lib/git/path.rb#5
2233
+ def path; end
2234
+
2235
+ # Sets the attribute path
2236
+ #
2237
+ # @param value the value to set the attribute path to.
2238
+ #
2239
+ # source://git//lib/git/path.rb#5
2240
+ def path=(_arg0); end
2241
+
2242
+ # @return [Boolean]
2243
+ #
2244
+ # source://git//lib/git/path.rb#17
2245
+ def readable?; end
2246
+
2247
+ # source://git//lib/git/path.rb#25
2248
+ def to_s; end
2249
+
2250
+ # @return [Boolean]
2251
+ #
2252
+ # source://git//lib/git/path.rb#21
2253
+ def writable?; end
2254
+ end
2255
+
2256
+ # source://git//lib/git/remote.rb#2
2257
+ class Git::Remote < ::Git::Path
2258
+ # @return [Remote] a new instance of Remote
2259
+ #
2260
+ # source://git//lib/git/remote.rb#6
2261
+ def initialize(base, name); end
2262
+
2263
+ # source://git//lib/git/remote.rb#23
2264
+ def branch(branch = T.unsafe(nil)); end
2265
+
2266
+ # source://git//lib/git/remote.rb#14
2267
+ def fetch(opts = T.unsafe(nil)); end
2268
+
2269
+ # Returns the value of attribute fetch_opts.
2270
+ #
2271
+ # source://git//lib/git/remote.rb#4
2272
+ def fetch_opts; end
2273
+
2274
+ # Sets the attribute fetch_opts
2275
+ #
2276
+ # @param value the value to set the attribute fetch_opts to.
2277
+ #
2278
+ # source://git//lib/git/remote.rb#4
2279
+ def fetch_opts=(_arg0); end
2280
+
2281
+ # merge this remote locally
2282
+ #
2283
+ # source://git//lib/git/remote.rb#19
2284
+ def merge(branch = T.unsafe(nil)); end
2285
+
2286
+ # Returns the value of attribute name.
2287
+ #
2288
+ # source://git//lib/git/remote.rb#4
2289
+ def name; end
2290
+
2291
+ # Sets the attribute name
2292
+ #
2293
+ # @param value the value to set the attribute name to.
2294
+ #
2295
+ # source://git//lib/git/remote.rb#4
2296
+ def name=(_arg0); end
2297
+
2298
+ # source://git//lib/git/remote.rb#27
2299
+ def remove; end
2300
+
2301
+ # source://git//lib/git/remote.rb#31
2302
+ def to_s; end
2303
+
2304
+ # Returns the value of attribute url.
2305
+ #
2306
+ # source://git//lib/git/remote.rb#4
2307
+ def url; end
2308
+
2309
+ # Sets the attribute url
2310
+ #
2311
+ # @param value the value to set the attribute url to.
2312
+ #
2313
+ # source://git//lib/git/remote.rb#4
2314
+ def url=(_arg0); end
2315
+ end
2316
+
2317
+ # source://git//lib/git/repository.rb#3
2318
+ class Git::Repository < ::Git::Path; end
2319
+
2320
+ # source://git//lib/git/stash.rb#2
2321
+ class Git::Stash
2322
+ # @return [Stash] a new instance of Stash
2323
+ #
2324
+ # source://git//lib/git/stash.rb#4
2325
+ def initialize(base, message, existing = T.unsafe(nil)); end
2326
+
2327
+ # source://git//lib/git/stash.rb#18
2328
+ def message; end
2329
+
2330
+ # source://git//lib/git/stash.rb#10
2331
+ def save; end
2332
+
2333
+ # @return [Boolean]
2334
+ #
2335
+ # source://git//lib/git/stash.rb#14
2336
+ def saved?; end
2337
+
2338
+ # source://git//lib/git/stash.rb#22
2339
+ def to_s; end
2340
+ end
2341
+
2342
+ # object that holds all the available stashes
2343
+ #
2344
+ # source://git//lib/git/stashes.rb#4
2345
+ class Git::Stashes
2346
+ include ::Enumerable
2347
+
2348
+ # @return [Stashes] a new instance of Stashes
2349
+ #
2350
+ # source://git//lib/git/stashes.rb#7
2351
+ def initialize(base); end
2352
+
2353
+ # source://git//lib/git/stashes.rb#50
2354
+ def [](index); end
2355
+
2356
+ # Returns an multi-dimensional Array of elements that have been stash saved.
2357
+ # Array is based on position and name. See Example
2358
+ #
2359
+ # @example Returns Array of items that have been stashed
2360
+ # .all - [0, "testing-stash-all"]]
2361
+ # @return [Array]
2362
+ #
2363
+ # source://git//lib/git/stashes.rb#24
2364
+ def all; end
2365
+
2366
+ # source://git//lib/git/stashes.rb#33
2367
+ def apply(index = T.unsafe(nil)); end
2368
+
2369
+ # source://git//lib/git/stashes.rb#37
2370
+ def clear; end
2371
+
2372
+ # source://git//lib/git/stashes.rb#46
2373
+ def each(&block); end
2374
+
2375
+ # source://git//lib/git/stashes.rb#28
2376
+ def save(message); end
2377
+
2378
+ # source://git//lib/git/stashes.rb#42
2379
+ def size; end
2380
+ end
2381
+
2382
+ # A class for git status
2383
+ #
2384
+ # source://git//lib/git/status.rb#5
2385
+ class Git::Status
2386
+ include ::Enumerable
2387
+
2388
+ # @return [Status] a new instance of Status
2389
+ #
2390
+ # source://git//lib/git/status.rb#8
2391
+ def initialize(base); end
2392
+
2393
+ # enumerable method
2394
+ #
2395
+ # source://git//lib/git/status.rb#119
2396
+ def [](file); end
2397
+
2398
+ # Returns an Enumerable containing files that have been added.
2399
+ # File path starts at git base directory
2400
+ #
2401
+ # @return [Enumerable]
2402
+ #
2403
+ # source://git//lib/git/status.rb#39
2404
+ def added; end
2405
+
2406
+ # Determines whether the given file has been added to the repository
2407
+ # File path starts at git base directory
2408
+ #
2409
+ # @example Check if lib/git.rb is added.
2410
+ # added?('lib/git.rb')
2411
+ # @param file [String] The name of the file.
2412
+ # @return [Boolean]
2413
+ #
2414
+ # source://git//lib/git/status.rb#51
2415
+ def added?(file); end
2416
+
2417
+ # Returns an Enumerable containing files that have changed from the
2418
+ # git base directory
2419
+ #
2420
+ # @return [Enumerable]
2421
+ #
2422
+ # source://git//lib/git/status.rb#18
2423
+ def changed; end
2424
+
2425
+ # Determines whether the given file has been changed.
2426
+ # File path starts at git base directory
2427
+ #
2428
+ # @example Check if lib/git.rb has changed.
2429
+ # changed?('lib/git.rb')
2430
+ # @param file [String] The name of the file.
2431
+ # @return [Boolean]
2432
+ #
2433
+ # source://git//lib/git/status.rb#30
2434
+ def changed?(file); end
2435
+
2436
+ # Returns an Enumerable containing files that have been deleted.
2437
+ # File path starts at git base directory
2438
+ #
2439
+ # @return [Enumerable]
2440
+ #
2441
+ # source://git//lib/git/status.rb#60
2442
+ def deleted; end
2443
+
2444
+ # Determines whether the given file has been deleted from the repository
2445
+ # File path starts at git base directory
2446
+ #
2447
+ # @example Check if lib/git.rb is deleted.
2448
+ # deleted?('lib/git.rb')
2449
+ # @param file [String] The name of the file.
2450
+ # @return [Boolean]
2451
+ #
2452
+ # source://git//lib/git/status.rb#72
2453
+ def deleted?(file); end
2454
+
2455
+ # source://git//lib/git/status.rb#123
2456
+ def each(&block); end
2457
+
2458
+ # source://git//lib/git/status.rb#97
2459
+ def pretty; end
2460
+
2461
+ # source://git//lib/git/status.rb#106
2462
+ def pretty_file(file); end
2463
+
2464
+ # Returns an Enumerable containing files that are not tracked in git.
2465
+ # File path starts at git base directory
2466
+ #
2467
+ # @return [Enumerable]
2468
+ #
2469
+ # source://git//lib/git/status.rb#81
2470
+ def untracked; end
2471
+
2472
+ # Determines whether the given file has is tracked by git.
2473
+ # File path starts at git base directory
2474
+ #
2475
+ # @example Check if lib/git.rb is an untracked file.
2476
+ # untracked?('lib/git.rb')
2477
+ # @param file [String] The name of the file.
2478
+ # @return [Boolean]
2479
+ #
2480
+ # source://git//lib/git/status.rb#93
2481
+ def untracked?(file); end
2482
+
2483
+ private
2484
+
2485
+ # source://git//lib/git/status.rb#160
2486
+ def construct_status; end
2487
+
2488
+ # source://git//lib/git/status.rb#192
2489
+ def fetch_added; end
2490
+
2491
+ # source://git//lib/git/status.rb#185
2492
+ def fetch_modified; end
2493
+
2494
+ # source://git//lib/git/status.rb#172
2495
+ def fetch_untracked; end
2496
+ end
2497
+
2498
+ # subclass that does heavy lifting
2499
+ #
2500
+ # source://git//lib/git/status.rb#128
2501
+ class Git::Status::StatusFile
2502
+ # @return [StatusFile] a new instance of StatusFile
2503
+ #
2504
+ # source://git//lib/git/status.rb#133
2505
+ def initialize(base, hash); end
2506
+
2507
+ # source://git//lib/git/status.rb#145
2508
+ def blob(type = T.unsafe(nil)); end
2509
+
2510
+ # Returns the value of attribute mode_index.
2511
+ #
2512
+ # source://git//lib/git/status.rb#130
2513
+ def mode_index; end
2514
+
2515
+ # Sets the attribute mode_index
2516
+ #
2517
+ # @param value the value to set the attribute mode_index to.
2518
+ #
2519
+ # source://git//lib/git/status.rb#130
2520
+ def mode_index=(_arg0); end
2521
+
2522
+ # Returns the value of attribute mode_repo.
2523
+ #
2524
+ # source://git//lib/git/status.rb#130
2525
+ def mode_repo; end
2526
+
2527
+ # Sets the attribute mode_repo
2528
+ #
2529
+ # @param value the value to set the attribute mode_repo to.
2530
+ #
2531
+ # source://git//lib/git/status.rb#130
2532
+ def mode_repo=(_arg0); end
2533
+
2534
+ # Returns the value of attribute path.
2535
+ #
2536
+ # source://git//lib/git/status.rb#129
2537
+ def path; end
2538
+
2539
+ # Sets the attribute path
2540
+ #
2541
+ # @param value the value to set the attribute path to.
2542
+ #
2543
+ # source://git//lib/git/status.rb#129
2544
+ def path=(_arg0); end
2545
+
2546
+ # Returns the value of attribute sha_index.
2547
+ #
2548
+ # source://git//lib/git/status.rb#131
2549
+ def sha_index; end
2550
+
2551
+ # Sets the attribute sha_index
2552
+ #
2553
+ # @param value the value to set the attribute sha_index to.
2554
+ #
2555
+ # source://git//lib/git/status.rb#131
2556
+ def sha_index=(_arg0); end
2557
+
2558
+ # Returns the value of attribute sha_repo.
2559
+ #
2560
+ # source://git//lib/git/status.rb#131
2561
+ def sha_repo; end
2562
+
2563
+ # Sets the attribute sha_repo
2564
+ #
2565
+ # @param value the value to set the attribute sha_repo to.
2566
+ #
2567
+ # source://git//lib/git/status.rb#131
2568
+ def sha_repo=(_arg0); end
2569
+
2570
+ # Returns the value of attribute stage.
2571
+ #
2572
+ # source://git//lib/git/status.rb#129
2573
+ def stage; end
2574
+
2575
+ # Sets the attribute stage
2576
+ #
2577
+ # @param value the value to set the attribute stage to.
2578
+ #
2579
+ # source://git//lib/git/status.rb#129
2580
+ def stage=(_arg0); end
2581
+
2582
+ # Returns the value of attribute type.
2583
+ #
2584
+ # source://git//lib/git/status.rb#129
2585
+ def type; end
2586
+
2587
+ # Sets the attribute type
2588
+ #
2589
+ # @param value the value to set the attribute type to.
2590
+ #
2591
+ # source://git//lib/git/status.rb#129
2592
+ def type=(_arg0); end
2593
+
2594
+ # Returns the value of attribute untracked.
2595
+ #
2596
+ # source://git//lib/git/status.rb#129
2597
+ def untracked; end
2598
+
2599
+ # Sets the attribute untracked
2600
+ #
2601
+ # @param value the value to set the attribute untracked to.
2602
+ #
2603
+ # source://git//lib/git/status.rb#129
2604
+ def untracked=(_arg0); end
2605
+ end
2606
+
2607
+ # The current gem version
2608
+ #
2609
+ # @return [String] the current gem version.
2610
+ #
2611
+ # source://git//lib/git/version.rb#4
2612
+ Git::VERSION = T.let(T.unsafe(nil), String)
2613
+
2614
+ # source://git//lib/git/working_directory.rb#2
2615
+ class Git::WorkingDirectory < ::Git::Path; end
2616
+
2617
+ # source://git//lib/git/worktree.rb#5
2618
+ class Git::Worktree < ::Git::Path
2619
+ # @return [Worktree] a new instance of Worktree
2620
+ #
2621
+ # source://git//lib/git/worktree.rb#9
2622
+ def initialize(base, dir, gcommit = T.unsafe(nil)); end
2623
+
2624
+ # source://git//lib/git/worktree.rb#22
2625
+ def add; end
2626
+
2627
+ # Returns the value of attribute dir.
2628
+ #
2629
+ # source://git//lib/git/worktree.rb#7
2630
+ def dir; end
2631
+
2632
+ # Sets the attribute dir
2633
+ #
2634
+ # @param value the value to set the attribute dir to.
2635
+ #
2636
+ # source://git//lib/git/worktree.rb#7
2637
+ def dir=(_arg0); end
2638
+
2639
+ # Returns the value of attribute full.
2640
+ #
2641
+ # source://git//lib/git/worktree.rb#7
2642
+ def full; end
2643
+
2644
+ # Sets the attribute full
2645
+ #
2646
+ # @param value the value to set the attribute full to.
2647
+ #
2648
+ # source://git//lib/git/worktree.rb#7
2649
+ def full=(_arg0); end
2650
+
2651
+ # Returns the value of attribute gcommit.
2652
+ #
2653
+ # source://git//lib/git/worktree.rb#17
2654
+ def gcommit; end
2655
+
2656
+ # Sets the attribute gcommit
2657
+ #
2658
+ # @param value the value to set the attribute gcommit to.
2659
+ #
2660
+ # source://git//lib/git/worktree.rb#7
2661
+ def gcommit=(_arg0); end
2662
+
2663
+ # source://git//lib/git/worktree.rb#26
2664
+ def remove; end
2665
+
2666
+ # source://git//lib/git/worktree.rb#30
2667
+ def to_a; end
2668
+
2669
+ # source://git//lib/git/worktree.rb#34
2670
+ def to_s; end
2671
+ end
2672
+
2673
+ # object that holds all the available worktrees
2674
+ #
2675
+ # source://git//lib/git/worktrees.rb#3
2676
+ class Git::Worktrees
2677
+ include ::Enumerable
2678
+
2679
+ # @return [Worktrees] a new instance of Worktrees
2680
+ #
2681
+ # source://git//lib/git/worktrees.rb#7
2682
+ def initialize(base); end
2683
+
2684
+ # source://git//lib/git/worktrees.rb#28
2685
+ def [](worktree_name); end
2686
+
2687
+ # source://git//lib/git/worktrees.rb#24
2688
+ def each(&block); end
2689
+
2690
+ # source://git//lib/git/worktrees.rb#43
2691
+ def prune; end
2692
+
2693
+ # array like methods
2694
+ #
2695
+ # source://git//lib/git/worktrees.rb#20
2696
+ def size; end
2697
+
2698
+ # source://git//lib/git/worktrees.rb#35
2699
+ def to_s; end
2700
+ end