danger-packwerk 0.14.0 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/danger-packwerk/version.rb +1 -1
- metadata +2 -88
- data/sorbet/config +0 -4
- data/sorbet/rbi/gems/actionview@7.0.4.rbi +0 -11543
- data/sorbet/rbi/gems/activesupport@7.0.4.rbi +0 -12959
- data/sorbet/rbi/gems/addressable@2.8.1.rbi +0 -1505
- data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -522
- data/sorbet/rbi/gems/better_html@2.0.1.rbi +0 -286
- data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -8
- data/sorbet/rbi/gems/claide-plugins@0.9.2.rbi +0 -791
- data/sorbet/rbi/gems/claide@1.1.0.rbi +0 -1132
- data/sorbet/rbi/gems/code_ownership@1.29.2.rbi +0 -525
- data/sorbet/rbi/gems/code_teams@1.0.0.rbi +0 -120
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -2256
- data/sorbet/rbi/gems/colored2@3.1.2.rbi +0 -130
- data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +0 -8695
- data/sorbet/rbi/gems/constant_resolver@0.2.0.rbi +0 -30
- data/sorbet/rbi/gems/cork@0.3.0.rbi +0 -248
- data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -436
- data/sorbet/rbi/gems/danger-plugin-api@1.0.0.rbi +0 -8
- data/sorbet/rbi/gems/danger@9.0.0.rbi +0 -4722
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -862
- data/sorbet/rbi/gems/erubi@1.11.0.rbi +0 -102
- data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +0 -266
- data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +0 -209
- data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +0 -212
- data/sorbet/rbi/gems/faraday-http-cache@2.4.1.rbi +0 -805
- data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +0 -221
- data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +0 -266
- data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +0 -216
- data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +0 -206
- data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +0 -212
- data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +0 -225
- data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +0 -222
- data/sorbet/rbi/gems/faraday@1.10.2.rbi +0 -1862
- data/sorbet/rbi/gems/git@1.12.0.rbi +0 -1936
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +0 -1643
- data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +0 -8
- data/sorbet/rbi/gems/kramdown@2.4.0.rbi +0 -2168
- data/sorbet/rbi/gems/loofah@2.19.0.rbi +0 -646
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -199
- data/sorbet/rbi/gems/minitest@5.16.3.rbi +0 -997
- data/sorbet/rbi/gems/multipart-post@2.2.3.rbi +0 -165
- data/sorbet/rbi/gems/nap@1.1.0.rbi +0 -351
- data/sorbet/rbi/gems/no_proxy_fix@0.1.2.rbi +0 -8
- data/sorbet/rbi/gems/nokogiri@1.13.8.rbi +0 -4916
- data/sorbet/rbi/gems/octokit@5.6.1.rbi +0 -8939
- data/sorbet/rbi/gems/open4@1.3.4.rbi +0 -8
- data/sorbet/rbi/gems/packs@0.0.5.rbi +0 -111
- data/sorbet/rbi/gems/packwerk@2.2.1-e998ef65194de398f0baaf03a0ba33390b30351e.rbi +0 -2161
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +0 -163
- data/sorbet/rbi/gems/parse_packwerk@0.18.0.rbi +0 -225
- data/sorbet/rbi/gems/parser@3.1.2.1.rbi +0 -5988
- data/sorbet/rbi/gems/pry@0.14.1.rbi +0 -6969
- data/sorbet/rbi/gems/public_suffix@5.0.0.rbi +0 -779
- data/sorbet/rbi/gems/racc@1.6.0.rbi +0 -92
- data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +0 -8
- data/sorbet/rbi/gems/rails-html-sanitizer@1.4.3.rbi +0 -493
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -227
- data/sorbet/rbi/gems/rake@13.0.6.rbi +0 -1865
- data/sorbet/rbi/gems/rbi@0.0.14.rbi +0 -2337
- data/sorbet/rbi/gems/rchardet@1.8.0.rbi +0 -587
- data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +0 -1851
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +0 -3852
- data/sorbet/rbi/gems/rspec-core@3.11.0.rbi +0 -7725
- data/sorbet/rbi/gems/rspec-expectations@3.11.0.rbi +0 -6201
- data/sorbet/rbi/gems/rspec-mocks@3.11.1.rbi +0 -3625
- data/sorbet/rbi/gems/rspec-support@3.11.0.rbi +0 -1176
- data/sorbet/rbi/gems/rspec@3.11.0.rbi +0 -40
- data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +0 -4193
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.8.rbi +0 -677
- data/sorbet/rbi/gems/rubocop@1.36.0.rbi +0 -37914
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -732
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +0 -8
- data/sorbet/rbi/gems/sawyer@0.9.2.rbi +0 -513
- data/sorbet/rbi/gems/smart_properties@1.17.0.rbi +0 -326
- data/sorbet/rbi/gems/spoom@1.1.11.rbi +0 -1600
- data/sorbet/rbi/gems/tapioca@0.8.0.rbi +0 -1959
- data/sorbet/rbi/gems/terminal-table@3.0.2.rbi +0 -438
- data/sorbet/rbi/gems/thor@1.2.1.rbi +0 -2921
- data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +0 -4879
- data/sorbet/rbi/gems/unicode-display_width@2.3.0.rbi +0 -27
- data/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -2789
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -1802
- data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +0 -288
- data/sorbet/rbi/gems/yard@0.9.27.rbi +0 -12668
- data/sorbet/rbi/todo.rbi +0 -125
- data/sorbet/tapioca/require.rb +0 -4
@@ -1,1936 +0,0 @@
|
|
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
|
-
module Git
|
14
|
-
# g.config('user.name', 'Scott Chacon') # sets value
|
15
|
-
# g.config('user.email', 'email@email.com') # sets value
|
16
|
-
# g.config('user.name') # returns 'Scott Chacon'
|
17
|
-
# g.config # returns whole config hash
|
18
|
-
def config(name = T.unsafe(nil), value = T.unsafe(nil)); end
|
19
|
-
|
20
|
-
def global_config(name = T.unsafe(nil), value = T.unsafe(nil)); end
|
21
|
-
|
22
|
-
class << self
|
23
|
-
# Open a bare repository
|
24
|
-
#
|
25
|
-
# Opens a bare repository located in the `git_dir` directory.
|
26
|
-
# Since there is no working copy, you can not checkout or commit
|
27
|
-
# but you can do most read operations.
|
28
|
-
#
|
29
|
-
# @example Open a bare repository and retrieve the first commit SHA
|
30
|
-
# repository = Git.bare('ruby-git.git')
|
31
|
-
# puts repository.log[0].sha #=> "64c6fa011d3287bab9158049c85f3e85718854a0"
|
32
|
-
# @option options
|
33
|
-
# @param git_dir [Pathname] The path to the bare repository directory
|
34
|
-
# containing an initialized Git repository. If a relative path is given, it
|
35
|
-
# is converted to an absolute path using
|
36
|
-
# [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
|
37
|
-
# @param options [Hash] The options for this command (see list of valid
|
38
|
-
# options below)
|
39
|
-
# @return [Git::Base] an object that can execute git commands in the context
|
40
|
-
# of the bare repository.
|
41
|
-
# @see https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbarerepositoryabarerepository What is a bare repository?
|
42
|
-
def bare(git_dir, options = T.unsafe(nil)); end
|
43
|
-
|
44
|
-
# Clone a repository into an empty or newly created directory
|
45
|
-
#
|
46
|
-
# @example Clone into a different directory `my-ruby-git`
|
47
|
-
# git = Git.clone('https://github.com/ruby-git/ruby-git.git', 'my-ruby-git')
|
48
|
-
# # or:
|
49
|
-
# git = Git.clone('https://github.com/ruby-git/ruby-git.git', path: 'my-ruby-git')
|
50
|
-
# @example Clone into the default directory `ruby-git`
|
51
|
-
# git = Git.clone('https://github.com/ruby-git/ruby-git.git')
|
52
|
-
# @example Create a bare repository in the directory `ruby-git.git`
|
53
|
-
# git = Git.clone('https://github.com/ruby-git/ruby-git.git', bare: true)
|
54
|
-
# @example Clone and then checkout the `development` branch
|
55
|
-
# git = Git.clone('https://github.com/ruby-git/ruby-git.git', branch: 'development')
|
56
|
-
# @option options
|
57
|
-
# @option options
|
58
|
-
# @option options
|
59
|
-
# @option options
|
60
|
-
# @option options
|
61
|
-
# @option options
|
62
|
-
# @option options
|
63
|
-
# @option options
|
64
|
-
# @param repository_url [URI, Pathname] The (possibly remote) repository url to clone
|
65
|
-
# from. See [GIT URLS](https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a)
|
66
|
-
# for more information.
|
67
|
-
# @param directory [Pathname, nil] The directory to clone into
|
68
|
-
#
|
69
|
-
# If `directory` is a relative directory it is relative to the `path` option if
|
70
|
-
# given. If `path` is not given, `directory` is relative to the current working
|
71
|
-
# directory.
|
72
|
-
#
|
73
|
-
# If `nil`, `directory` will be set to the basename of the last component of
|
74
|
-
# the path from the `repository_url`. For example, for the URL:
|
75
|
-
# `https://github.com/org/repo.git`, `directory` will be set to `repo`.
|
76
|
-
#
|
77
|
-
# If the last component of the path is `.git`, the next-to-last component of
|
78
|
-
# the path is used. For example, for the URL `/Users/me/foo/.git`, `directory`
|
79
|
-
# will be set to `foo`.
|
80
|
-
# @param options [Hash] The options for this command (see list of valid
|
81
|
-
# options below)
|
82
|
-
# @return [Git::Base] an object that can execute git commands in the context
|
83
|
-
# of the cloned local working copy or cloned repository.
|
84
|
-
# @see https://git-scm.com/docs/git-clone git clone
|
85
|
-
# @see https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a GIT URLs
|
86
|
-
def clone(repository_url, directory = T.unsafe(nil), options = T.unsafe(nil)); end
|
87
|
-
|
88
|
-
def config; end
|
89
|
-
|
90
|
-
# @yield [Base.config]
|
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
|
-
def export(repository, name, options = T.unsafe(nil)); end
|
101
|
-
|
102
|
-
# Same as g.config, but forces it to be at the global level
|
103
|
-
#
|
104
|
-
# g.config('user.name', 'Scott Chacon') # sets value
|
105
|
-
# g.config('user.email', 'email@email.com') # sets value
|
106
|
-
# g.config('user.name') # returns 'Scott Chacon'
|
107
|
-
# g.config # returns whole config hash
|
108
|
-
def global_config(name = T.unsafe(nil), value = T.unsafe(nil)); end
|
109
|
-
|
110
|
-
# Create an empty Git repository or reinitialize an existing Git repository
|
111
|
-
#
|
112
|
-
# @example Initialize a repository in some other directory
|
113
|
-
# git = Git.init '~/code/ruby-git'
|
114
|
-
# @example Initialize a bare repository
|
115
|
-
# git = Git.init '~/code/ruby-git.git', bare: true
|
116
|
-
# @example Initialize a repository in the current directory
|
117
|
-
# git = Git.init
|
118
|
-
# @example Initialize a repository in a non-default location (outside of the working copy)
|
119
|
-
# git = Git.init '~/code/ruby-git', repository: '~/code/ruby-git.git'
|
120
|
-
# @option options
|
121
|
-
# @option options
|
122
|
-
# @option options
|
123
|
-
# @option options
|
124
|
-
# @param directory [Pathname] If the `:bare` option is NOT given or is not
|
125
|
-
# `true`, the repository will be created in `"#{directory}/.git"`.
|
126
|
-
# Otherwise, the repository is created in `"#{directory}"`.
|
127
|
-
#
|
128
|
-
# All directories along the path to `directory` are created if they do not exist.
|
129
|
-
#
|
130
|
-
# A relative path is referenced from the current working directory of the process
|
131
|
-
# and converted to an absolute path using
|
132
|
-
# [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
|
133
|
-
# @param options [Hash] The options for this command (see list of valid
|
134
|
-
# options below)
|
135
|
-
# @return [Git::Base] an object that can execute git commands in the context
|
136
|
-
# of the newly initialized repository
|
137
|
-
# @see https://git-scm.com/docs/git-init git init
|
138
|
-
def init(directory = T.unsafe(nil), options = T.unsafe(nil)); end
|
139
|
-
|
140
|
-
# returns a Hash containing information about the references
|
141
|
-
# of the target repository
|
142
|
-
#
|
143
|
-
# options
|
144
|
-
# :refs
|
145
|
-
#
|
146
|
-
# @param location [String|NilClass] the target repository location or nil for '.'
|
147
|
-
# @return [{String=>Hash}] the available references of the target repo.
|
148
|
-
def ls_remote(location = T.unsafe(nil), options = T.unsafe(nil)); end
|
149
|
-
|
150
|
-
# Open a an existing Git working directory
|
151
|
-
#
|
152
|
-
# Git.open will most likely be the most common way to create
|
153
|
-
# a git reference, referring to an existing working directory.
|
154
|
-
#
|
155
|
-
# If not provided in the options, the library will assume
|
156
|
-
# the repository and index are in the default places (`.git/`, `.git/index`).
|
157
|
-
#
|
158
|
-
# @example Open a Git working directory in some other directory
|
159
|
-
# git = Git.open('~/Projects/ruby-git')
|
160
|
-
# @example Open the Git working directory in the current directory
|
161
|
-
# git = Git.open
|
162
|
-
# @example Use a logger to see what is going on
|
163
|
-
# logger = Logger.new(STDOUT)
|
164
|
-
# git = Git.open('~/Projects/ruby-git', log: logger)
|
165
|
-
# @example Open a working copy whose repository is in a non-standard directory
|
166
|
-
# git = Git.open('~/Projects/ruby-git', repository: '~/Project/ruby-git.git')
|
167
|
-
# @option options
|
168
|
-
# @option options
|
169
|
-
# @option options
|
170
|
-
# @param working_dir [Pathname] the path to the working directory to use
|
171
|
-
# for git commands.
|
172
|
-
#
|
173
|
-
# A relative path is referenced from the current working directory of the process
|
174
|
-
# and converted to an absolute path using
|
175
|
-
# [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
|
176
|
-
# @param options [Hash] The options for this command (see list of valid
|
177
|
-
# options below)
|
178
|
-
# @return [Git::Base] an object that can execute git commands in the context
|
179
|
-
# of the opened working copy
|
180
|
-
def open(working_dir, options = T.unsafe(nil)); end
|
181
|
-
end
|
182
|
-
end
|
183
|
-
|
184
|
-
class Git::Author
|
185
|
-
# @return [Author] a new instance of Author
|
186
|
-
def initialize(author_string); end
|
187
|
-
|
188
|
-
# Returns the value of attribute date.
|
189
|
-
def date; end
|
190
|
-
|
191
|
-
# Sets the attribute date
|
192
|
-
#
|
193
|
-
# @param value the value to set the attribute date to.
|
194
|
-
def date=(_arg0); end
|
195
|
-
|
196
|
-
# Returns the value of attribute email.
|
197
|
-
def email; end
|
198
|
-
|
199
|
-
# Sets the attribute email
|
200
|
-
#
|
201
|
-
# @param value the value to set the attribute email to.
|
202
|
-
def email=(_arg0); end
|
203
|
-
|
204
|
-
# Returns the value of attribute name.
|
205
|
-
def name; end
|
206
|
-
|
207
|
-
# Sets the attribute name
|
208
|
-
#
|
209
|
-
# @param value the value to set the attribute name to.
|
210
|
-
def name=(_arg0); end
|
211
|
-
end
|
212
|
-
|
213
|
-
# Git::Base is the main public interface for interacting with Git commands.
|
214
|
-
#
|
215
|
-
# Instead of creating a Git::Base directly, obtain a Git::Base instance by
|
216
|
-
# calling one of the follow {Git} class methods: {Git.open}, {Git.init},
|
217
|
-
# {Git.clone}, or {Git.bare}.
|
218
|
-
class Git::Base
|
219
|
-
include ::Git::Base::Factory
|
220
|
-
|
221
|
-
# Create an object that executes Git commands in the context of a working
|
222
|
-
# copy or a bare repository.
|
223
|
-
#
|
224
|
-
# @option options
|
225
|
-
# @option options
|
226
|
-
# @option options
|
227
|
-
# @option options
|
228
|
-
# @param options [Hash] The options for this command (see list of valid
|
229
|
-
# options below)
|
230
|
-
# @return [Git::Base] an object that can execute git commands in the context
|
231
|
-
# of the opened working copy or bare repository
|
232
|
-
def initialize(options = T.unsafe(nil)); end
|
233
|
-
|
234
|
-
# updates the repository index using the working directory content
|
235
|
-
#
|
236
|
-
# options:
|
237
|
-
# :all => true
|
238
|
-
#
|
239
|
-
# @example
|
240
|
-
# git.add
|
241
|
-
# git.add('path/to/file')
|
242
|
-
# git.add(['path/to/file1','path/to/file2'])
|
243
|
-
# git.add(:all => true)
|
244
|
-
# @option options
|
245
|
-
# @param paths [String, Array] files paths to be added (optional, default='.')
|
246
|
-
# @param options [Hash]
|
247
|
-
def add(paths = T.unsafe(nil), **options); end
|
248
|
-
|
249
|
-
# adds a new remote to this repository
|
250
|
-
# url can be a git url or a Git::Base object if it's a local reference
|
251
|
-
#
|
252
|
-
# @git.add_remote('scotts_git', 'git://repo.or.cz/rubygit.git')
|
253
|
-
# @git.fetch('scotts_git')
|
254
|
-
# @git.merge('scotts_git/master')
|
255
|
-
#
|
256
|
-
# Options:
|
257
|
-
# :fetch => true
|
258
|
-
# :track => <branch_name>
|
259
|
-
def add_remote(name, url, opts = T.unsafe(nil)); end
|
260
|
-
|
261
|
-
# Creates a new git tag (Git::Tag)
|
262
|
-
#
|
263
|
-
# @example
|
264
|
-
# repo.add_tag('tag_name', object_reference)
|
265
|
-
# repo.add_tag('tag_name', object_reference, {:options => 'here'})
|
266
|
-
# repo.add_tag('tag_name', {:options => 'here'})
|
267
|
-
# @option options
|
268
|
-
# @option options
|
269
|
-
# @option options
|
270
|
-
# @option options
|
271
|
-
# @option options
|
272
|
-
# @option options
|
273
|
-
# @option options
|
274
|
-
# @param name [String] The name of the tag to add
|
275
|
-
# @param options [Hash] Opstions to pass to `git tag`.
|
276
|
-
# See [git-tag](https://git-scm.com/docs/git-tag) for more details.
|
277
|
-
def add_tag(name, *options); end
|
278
|
-
|
279
|
-
def apply(file); end
|
280
|
-
def apply_mail(file); end
|
281
|
-
|
282
|
-
# creates an archive file of the given tree-ish
|
283
|
-
def archive(treeish, file = T.unsafe(nil), opts = T.unsafe(nil)); end
|
284
|
-
|
285
|
-
def cat_file(objectish); end
|
286
|
-
|
287
|
-
# changes current working directory for a block
|
288
|
-
# to the git working directory
|
289
|
-
#
|
290
|
-
# example
|
291
|
-
# @git.chdir do
|
292
|
-
# # write files
|
293
|
-
# @git.add
|
294
|
-
# @git.commit('message')
|
295
|
-
# end
|
296
|
-
def chdir; end
|
297
|
-
|
298
|
-
# checks out a branch as the new git working directory
|
299
|
-
def checkout(branch = T.unsafe(nil), opts = T.unsafe(nil)); end
|
300
|
-
|
301
|
-
# checks out an old version of a file
|
302
|
-
def checkout_file(version, file); end
|
303
|
-
|
304
|
-
def checkout_index(opts = T.unsafe(nil)); end
|
305
|
-
|
306
|
-
# cleans the working directory
|
307
|
-
#
|
308
|
-
# options:
|
309
|
-
# :force
|
310
|
-
# :d
|
311
|
-
# :ff
|
312
|
-
def clean(opts = T.unsafe(nil)); end
|
313
|
-
|
314
|
-
# commits all pending changes in the index file to the git repository
|
315
|
-
#
|
316
|
-
# options:
|
317
|
-
# :all
|
318
|
-
# :allow_empty
|
319
|
-
# :amend
|
320
|
-
# :author
|
321
|
-
def commit(message, opts = T.unsafe(nil)); end
|
322
|
-
|
323
|
-
# commits all pending changes in the index file to the git repository,
|
324
|
-
# but automatically adds all modified files without having to explicitly
|
325
|
-
# calling @git.add() on them.
|
326
|
-
def commit_all(message, opts = T.unsafe(nil)); end
|
327
|
-
|
328
|
-
# g.config('user.name', 'Scott Chacon') # sets value
|
329
|
-
# g.config('user.email', 'email@email.com') # sets value
|
330
|
-
# g.config('user.email', 'email@email.com', file: 'path/to/custom/config) # sets value in file
|
331
|
-
# g.config('user.name') # returns 'Scott Chacon'
|
332
|
-
# g.config # returns whole config hash
|
333
|
-
def config(name = T.unsafe(nil), value = T.unsafe(nil), options = T.unsafe(nil)); end
|
334
|
-
|
335
|
-
# returns the name of the branch the working directory is currently on
|
336
|
-
def current_branch; end
|
337
|
-
|
338
|
-
# deletes a tag
|
339
|
-
def delete_tag(name); end
|
340
|
-
|
341
|
-
# returns the most recent tag that is reachable from a commit
|
342
|
-
#
|
343
|
-
# options:
|
344
|
-
# :all
|
345
|
-
# :tags
|
346
|
-
# :contains
|
347
|
-
# :debug
|
348
|
-
# :exact_match
|
349
|
-
# :dirty
|
350
|
-
# :abbrev
|
351
|
-
# :candidates
|
352
|
-
# :long
|
353
|
-
# :always
|
354
|
-
# :match
|
355
|
-
def describe(committish = T.unsafe(nil), opts = T.unsafe(nil)); end
|
356
|
-
|
357
|
-
# returns a reference to the working directory
|
358
|
-
# @git.dir.path
|
359
|
-
# @git.dir.writeable?
|
360
|
-
def dir; end
|
361
|
-
|
362
|
-
# iterates over the files which are unmerged
|
363
|
-
def each_conflict(&block); end
|
364
|
-
|
365
|
-
# fetches changes from a remote branch - this does not modify the working directory,
|
366
|
-
# it just gets the changes from the remote if there are any
|
367
|
-
def fetch(remote = T.unsafe(nil), opts = T.unsafe(nil)); end
|
368
|
-
|
369
|
-
def gc; end
|
370
|
-
|
371
|
-
# Run a grep for 'string' on the HEAD of the git repository
|
372
|
-
#
|
373
|
-
# @example Limit grep's scope by calling grep() from a specific object:
|
374
|
-
# git.object("v2.3").grep('TODO')
|
375
|
-
# @example Using grep results:
|
376
|
-
# git.grep("TODO").each do |sha, arr|
|
377
|
-
# puts "in blob #{sha}:"
|
378
|
-
# arr.each do |line_no, match_string|
|
379
|
-
# puts "\t line #{line_no}: '#{match_string}'"
|
380
|
-
# end
|
381
|
-
# end
|
382
|
-
# @return [Hash<String, Array>] a hash of arrays
|
383
|
-
# ```Ruby
|
384
|
-
# {
|
385
|
-
# 'tree-ish1' => [[line_no1, match_string1], ...],
|
386
|
-
# 'tree-ish2' => [[line_no1, match_string1], ...],
|
387
|
-
# ...
|
388
|
-
# }
|
389
|
-
# ```
|
390
|
-
def grep(string, path_limiter = T.unsafe(nil), opts = T.unsafe(nil)); end
|
391
|
-
|
392
|
-
# returns reference to the git index file
|
393
|
-
def index; end
|
394
|
-
|
395
|
-
# returns +true+ if the branch exists
|
396
|
-
#
|
397
|
-
# @return [Boolean]
|
398
|
-
def is_branch?(branch); end
|
399
|
-
|
400
|
-
# returns +true+ if the branch exists locally
|
401
|
-
#
|
402
|
-
# @return [Boolean]
|
403
|
-
def is_local_branch?(branch); end
|
404
|
-
|
405
|
-
# returns +true+ if the branch exists remotely
|
406
|
-
#
|
407
|
-
# @return [Boolean]
|
408
|
-
def is_remote_branch?(branch); end
|
409
|
-
|
410
|
-
# this is a convenience method for accessing the class that wraps all the
|
411
|
-
# actual 'git' forked system calls. At some point I hope to replace the Git::Lib
|
412
|
-
# class with one that uses native methods or libgit C bindings
|
413
|
-
def lib; end
|
414
|
-
|
415
|
-
def ls_files(location = T.unsafe(nil)); end
|
416
|
-
def ls_tree(objectish); end
|
417
|
-
|
418
|
-
# merges one or more branches into the current working branch
|
419
|
-
#
|
420
|
-
# you can specify more than one branch to merge by passing an array of branches
|
421
|
-
def merge(branch, message = T.unsafe(nil), opts = T.unsafe(nil)); end
|
422
|
-
|
423
|
-
# Use git-merge-base https://git-scm.com/docs/git-merge-base to
|
424
|
-
# find as good common ancestors as possible for a merge
|
425
|
-
def merge_base(commit1, commit2, *other_commits); end
|
426
|
-
|
427
|
-
# pulls the given branch from the given remote into the current branch
|
428
|
-
#
|
429
|
-
# @git.pull # pulls from origin/master
|
430
|
-
# @git.pull('upstream') # pulls from upstream/master
|
431
|
-
# @git.pull('upstream', 'develope') # pulls from upstream/develop
|
432
|
-
def pull(remote = T.unsafe(nil), branch = T.unsafe(nil)); end
|
433
|
-
|
434
|
-
# pushes changes to a remote repository - easiest if this is a cloned repository,
|
435
|
-
# otherwise you may have to run something like this first to setup the push parameters:
|
436
|
-
#
|
437
|
-
# @git.config('remote.remote-name.push', 'refs/heads/master:refs/heads/master')
|
438
|
-
def push(remote = T.unsafe(nil), branch = T.unsafe(nil), opts = T.unsafe(nil)); end
|
439
|
-
|
440
|
-
def read_tree(treeish, opts = T.unsafe(nil)); end
|
441
|
-
|
442
|
-
# returns an array of Git:Remote objects
|
443
|
-
def remotes; end
|
444
|
-
|
445
|
-
# removes file(s) from the git repository
|
446
|
-
def remove(path = T.unsafe(nil), opts = T.unsafe(nil)); end
|
447
|
-
|
448
|
-
# removes a remote from this repository
|
449
|
-
#
|
450
|
-
# @git.remove_remote('scott_git')
|
451
|
-
def remove_remote(name); end
|
452
|
-
|
453
|
-
# repacks the repository
|
454
|
-
def repack; end
|
455
|
-
|
456
|
-
# returns reference to the git repository directory
|
457
|
-
# @git.dir.path
|
458
|
-
def repo; end
|
459
|
-
|
460
|
-
# returns the repository size in bytes
|
461
|
-
def repo_size; end
|
462
|
-
|
463
|
-
# resets the working directory to the provided commitish
|
464
|
-
def reset(commitish = T.unsafe(nil), opts = T.unsafe(nil)); end
|
465
|
-
|
466
|
-
# resets the working directory to the commitish with '--hard'
|
467
|
-
def reset_hard(commitish = T.unsafe(nil), opts = T.unsafe(nil)); end
|
468
|
-
|
469
|
-
# reverts the working directory to the provided commitish.
|
470
|
-
# Accepts a range, such as comittish..HEAD
|
471
|
-
#
|
472
|
-
# options:
|
473
|
-
# :no_edit
|
474
|
-
def revert(commitish = T.unsafe(nil), opts = T.unsafe(nil)); end
|
475
|
-
|
476
|
-
# runs git rev-parse to convert the objectish to a full sha
|
477
|
-
#
|
478
|
-
# @example
|
479
|
-
# git.revparse("HEAD^^")
|
480
|
-
# git.revparse('v2.4^{tree}')
|
481
|
-
# git.revparse('v2.4:/doc/index.html')
|
482
|
-
def revparse(objectish); end
|
483
|
-
|
484
|
-
def set_index(index_file, check = T.unsafe(nil)); end
|
485
|
-
|
486
|
-
# sets the url for a remote
|
487
|
-
# url can be a git url or a Git::Base object if it's a local reference
|
488
|
-
#
|
489
|
-
# @git.set_remote_url('scotts_git', 'git://repo.or.cz/rubygit.git')
|
490
|
-
def set_remote_url(name, url); end
|
491
|
-
|
492
|
-
def set_working(work_dir, check = T.unsafe(nil)); end
|
493
|
-
|
494
|
-
# Shows objects
|
495
|
-
#
|
496
|
-
# @param objectish [String|NilClass] the target object reference (nil == HEAD)
|
497
|
-
# @param path [String|NilClass] the path of the file to be shown
|
498
|
-
# @return [String] the object information
|
499
|
-
def show(objectish = T.unsafe(nil), path = T.unsafe(nil)); end
|
500
|
-
|
501
|
-
# returns an array of all Git::Tag objects for this repository
|
502
|
-
def tags; end
|
503
|
-
|
504
|
-
def update_ref(branch, commit); end
|
505
|
-
|
506
|
-
# LOWER LEVEL INDEX OPERATIONS ##
|
507
|
-
def with_index(new_index); end
|
508
|
-
|
509
|
-
def with_temp_index(&blk); end
|
510
|
-
def with_temp_working(&blk); end
|
511
|
-
|
512
|
-
# :yields: the Git::WorkingDirectory
|
513
|
-
def with_working(work_dir); end
|
514
|
-
|
515
|
-
def write_and_commit_tree(opts = T.unsafe(nil)); end
|
516
|
-
def write_tree; end
|
517
|
-
|
518
|
-
class << self
|
519
|
-
# Open a bare repository
|
520
|
-
#
|
521
|
-
# Opens a bare repository located in the `git_dir` directory.
|
522
|
-
# Since there is no working copy, you can not checkout or commit
|
523
|
-
# but you can do most read operations.
|
524
|
-
#
|
525
|
-
# @example Open a bare repository and retrieve the first commit SHA
|
526
|
-
# repository = Git.bare('ruby-git.git')
|
527
|
-
# puts repository.log[0].sha #=> "64c6fa011d3287bab9158049c85f3e85718854a0"
|
528
|
-
# @option options
|
529
|
-
# @param git_dir [Pathname] The path to the bare repository directory
|
530
|
-
# containing an initialized Git repository. If a relative path is given, it
|
531
|
-
# is converted to an absolute path using
|
532
|
-
# [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
|
533
|
-
# @param options [Hash] The options for this command (see list of valid
|
534
|
-
# options below)
|
535
|
-
# @return [Git::Base] an object that can execute git commands in the context
|
536
|
-
# of the bare repository.
|
537
|
-
# @see https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbarerepositoryabarerepository What is a bare repository?
|
538
|
-
def bare(git_dir, options = T.unsafe(nil)); end
|
539
|
-
|
540
|
-
# Clone a repository into an empty or newly created directory
|
541
|
-
#
|
542
|
-
# @example Clone into a different directory `my-ruby-git`
|
543
|
-
# git = Git.clone('https://github.com/ruby-git/ruby-git.git', 'my-ruby-git')
|
544
|
-
# # or:
|
545
|
-
# git = Git.clone('https://github.com/ruby-git/ruby-git.git', path: 'my-ruby-git')
|
546
|
-
# @example Clone into the default directory `ruby-git`
|
547
|
-
# git = Git.clone('https://github.com/ruby-git/ruby-git.git')
|
548
|
-
# @example Create a bare repository in the directory `ruby-git.git`
|
549
|
-
# git = Git.clone('https://github.com/ruby-git/ruby-git.git', bare: true)
|
550
|
-
# @example Clone and then checkout the `development` branch
|
551
|
-
# git = Git.clone('https://github.com/ruby-git/ruby-git.git', branch: 'development')
|
552
|
-
# @option options
|
553
|
-
# @option options
|
554
|
-
# @option options
|
555
|
-
# @option options
|
556
|
-
# @option options
|
557
|
-
# @option options
|
558
|
-
# @option options
|
559
|
-
# @option options
|
560
|
-
# @param repository_url [URI, Pathname] The (possibly remote) repository url to clone
|
561
|
-
# from. See [GIT URLS](https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a)
|
562
|
-
# for more information.
|
563
|
-
# @param directory [Pathname, nil] The directory to clone into
|
564
|
-
#
|
565
|
-
# If `directory` is a relative directory it is relative to the `path` option if
|
566
|
-
# given. If `path` is not given, `directory` is relative to the current working
|
567
|
-
# directory.
|
568
|
-
#
|
569
|
-
# If `nil`, `directory` will be set to the basename of the last component of
|
570
|
-
# the path from the `repository_url`. For example, for the URL:
|
571
|
-
# `https://github.com/org/repo.git`, `directory` will be set to `repo`.
|
572
|
-
#
|
573
|
-
# If the last component of the path is `.git`, the next-to-last component of
|
574
|
-
# the path is used. For example, for the URL `/Users/me/foo/.git`, `directory`
|
575
|
-
# will be set to `foo`.
|
576
|
-
# @param options [Hash] The options for this command (see list of valid
|
577
|
-
# options below)
|
578
|
-
# @return [Git::Base] an object that can execute git commands in the context
|
579
|
-
# of the cloned local working copy or cloned repository.
|
580
|
-
# @see https://git-scm.com/docs/git-clone git clone
|
581
|
-
# @see https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a GIT URLs
|
582
|
-
def clone(repository_url, directory, options = T.unsafe(nil)); end
|
583
|
-
|
584
|
-
# Returns (and initialize if needed) a Git::Config instance
|
585
|
-
#
|
586
|
-
# @return [Git::Config] the current config instance.
|
587
|
-
def config; end
|
588
|
-
|
589
|
-
# Create an empty Git repository or reinitialize an existing Git repository
|
590
|
-
#
|
591
|
-
# @example Initialize a repository in some other directory
|
592
|
-
# git = Git.init '~/code/ruby-git'
|
593
|
-
# @example Initialize a bare repository
|
594
|
-
# git = Git.init '~/code/ruby-git.git', bare: true
|
595
|
-
# @example Initialize a repository in the current directory
|
596
|
-
# git = Git.init
|
597
|
-
# @example Initialize a repository in a non-default location (outside of the working copy)
|
598
|
-
# git = Git.init '~/code/ruby-git', repository: '~/code/ruby-git.git'
|
599
|
-
# @option options
|
600
|
-
# @option options
|
601
|
-
# @option options
|
602
|
-
# @option options
|
603
|
-
# @param directory [Pathname] If the `:bare` option is NOT given or is not
|
604
|
-
# `true`, the repository will be created in `"#{directory}/.git"`.
|
605
|
-
# Otherwise, the repository is created in `"#{directory}"`.
|
606
|
-
#
|
607
|
-
# All directories along the path to `directory` are created if they do not exist.
|
608
|
-
#
|
609
|
-
# A relative path is referenced from the current working directory of the process
|
610
|
-
# and converted to an absolute path using
|
611
|
-
# [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
|
612
|
-
# @param options [Hash] The options for this command (see list of valid
|
613
|
-
# options below)
|
614
|
-
# @return [Git::Base] an object that can execute git commands in the context
|
615
|
-
# of the newly initialized repository
|
616
|
-
# @see https://git-scm.com/docs/git-init git init
|
617
|
-
def init(directory = T.unsafe(nil), options = T.unsafe(nil)); end
|
618
|
-
|
619
|
-
# Open a an existing Git working directory
|
620
|
-
#
|
621
|
-
# Git.open will most likely be the most common way to create
|
622
|
-
# a git reference, referring to an existing working directory.
|
623
|
-
#
|
624
|
-
# If not provided in the options, the library will assume
|
625
|
-
# the repository and index are in the default places (`.git/`, `.git/index`).
|
626
|
-
#
|
627
|
-
# @example Open a Git working directory in some other directory
|
628
|
-
# git = Git.open('~/Projects/ruby-git')
|
629
|
-
# @example Open the Git working directory in the current directory
|
630
|
-
# git = Git.open
|
631
|
-
# @example Use a logger to see what is going on
|
632
|
-
# logger = Logger.new(STDOUT)
|
633
|
-
# git = Git.open('~/Projects/ruby-git', log: logger)
|
634
|
-
# @example Open a working copy whose repository is in a non-standard directory
|
635
|
-
# git = Git.open('~/Projects/ruby-git', repository: '~/Project/ruby-git.git')
|
636
|
-
# @option options
|
637
|
-
# @option options
|
638
|
-
# @option options
|
639
|
-
# @param working_dir [Pathname] the path to the working directory to use
|
640
|
-
# for git commands.
|
641
|
-
#
|
642
|
-
# A relative path is referenced from the current working directory of the process
|
643
|
-
# and converted to an absolute path using
|
644
|
-
# [File.expand_path](https://www.rubydoc.info/stdlib/core/File.expand_path).
|
645
|
-
# @param options [Hash] The options for this command (see list of valid
|
646
|
-
# options below)
|
647
|
-
# @return [Git::Base] an object that can execute git commands in the context
|
648
|
-
# of the opened working copy
|
649
|
-
def open(working_dir, options = T.unsafe(nil)); end
|
650
|
-
|
651
|
-
private
|
652
|
-
|
653
|
-
# Normalize options[:index]
|
654
|
-
#
|
655
|
-
# If options[:index] is a relative directory, convert it to an absolute
|
656
|
-
# directory relative to the repository directory
|
657
|
-
def normalize_index(options); end
|
658
|
-
|
659
|
-
# Normalize options before they are sent to Git::Base.new
|
660
|
-
#
|
661
|
-
# Updates the options parameter by setting appropriate values for the following keys:
|
662
|
-
# * options[:working_directory]
|
663
|
-
# * options[:repository]
|
664
|
-
# * options[:index]
|
665
|
-
#
|
666
|
-
# All three values will be set to absolute paths. An exception is that
|
667
|
-
# :working_directory will be set to nil if bare is true.
|
668
|
-
def normalize_paths(options, default_working_directory: T.unsafe(nil), default_repository: T.unsafe(nil), bare: T.unsafe(nil)); end
|
669
|
-
|
670
|
-
# Normalize options[:repository]
|
671
|
-
#
|
672
|
-
# If working with a bare repository, set to the first non-nil value out of:
|
673
|
-
# 1. `options[:repository]`
|
674
|
-
# 2. the `default` parameter
|
675
|
-
# 3. the current working directory
|
676
|
-
#
|
677
|
-
# Otherwise, set to the first non-nil value of:
|
678
|
-
# 1. `options[:repository]`
|
679
|
-
# 2. `.git`
|
680
|
-
#
|
681
|
-
# Next, if options[:repository] refers to a *file* and not a *directory*, set
|
682
|
-
# options[:repository] to the contents of that file. This is the case when
|
683
|
-
# working with a submodule or a secondary working tree (created with git worktree
|
684
|
-
# add). In these cases the repository is actually contained/nested within the
|
685
|
-
# parent's repository directory.
|
686
|
-
#
|
687
|
-
# Finally, if options[:repository] is a relative path, convert it to an absolute
|
688
|
-
# path relative to:
|
689
|
-
# 1. the current directory if working with a bare repository or
|
690
|
-
# 2. the working directory if NOT working with a bare repository
|
691
|
-
def normalize_repository(options, default:, bare: T.unsafe(nil)); end
|
692
|
-
|
693
|
-
# Normalize options[:working_directory]
|
694
|
-
#
|
695
|
-
# If working with a bare repository, set to `nil`.
|
696
|
-
# Otherwise, set to the first non-nil value of:
|
697
|
-
# 1. `options[:working_directory]`,
|
698
|
-
# 2. the `default` parameter, or
|
699
|
-
# 3. the current working directory
|
700
|
-
#
|
701
|
-
# Finally, if options[:working_directory] is a relative path, convert it to an absoluite
|
702
|
-
# path relative to the current directory.
|
703
|
-
def normalize_working_directory(options, default:, bare: T.unsafe(nil)); end
|
704
|
-
end
|
705
|
-
end
|
706
|
-
|
707
|
-
module Git::Base::Factory
|
708
|
-
# @return [Git::Branch] an object for branch_name
|
709
|
-
def branch(branch_name = T.unsafe(nil)); end
|
710
|
-
|
711
|
-
# @return [Git::Branches] a collection of all the branches in the repository.
|
712
|
-
# Each branch is represented as a {Git::Branch}.
|
713
|
-
def branches; end
|
714
|
-
|
715
|
-
# @return [Git::Object::Commit] a commit object
|
716
|
-
def commit_tree(tree = T.unsafe(nil), opts = T.unsafe(nil)); end
|
717
|
-
|
718
|
-
# @return [Git::Diff] a Git::Diff object
|
719
|
-
def diff(objectish = T.unsafe(nil), obj2 = T.unsafe(nil)); end
|
720
|
-
|
721
|
-
# @return [Git::Object] a Git object
|
722
|
-
def gblob(objectish); end
|
723
|
-
|
724
|
-
# @return [Git::Object] a Git object
|
725
|
-
def gcommit(objectish); end
|
726
|
-
|
727
|
-
# @return [Git::Object] a Git object
|
728
|
-
def gtree(objectish); end
|
729
|
-
|
730
|
-
# @return [Git::Log] a log with the specified number of commits
|
731
|
-
def log(count = T.unsafe(nil)); end
|
732
|
-
|
733
|
-
# Find as good common ancestors as possible for a merge
|
734
|
-
# example: g.merge_base('master', 'some_branch', 'some_sha', octopus: true)
|
735
|
-
#
|
736
|
-
# @return [Array<Git::Object::Commit>] a collection of common ancestors
|
737
|
-
def merge_base(*args); end
|
738
|
-
|
739
|
-
# returns a Git::Object of the appropriate type
|
740
|
-
# you can also call @git.gtree('tree'), but that's
|
741
|
-
# just for readability. If you call @git.gtree('HEAD') it will
|
742
|
-
# still return a Git::Object::Commit object.
|
743
|
-
#
|
744
|
-
# object calls a factory method that will run a rev-parse
|
745
|
-
# on the objectish and determine the type of the object and return
|
746
|
-
# an appropriate object for that type
|
747
|
-
#
|
748
|
-
# @return [Git::Object] an instance of the appropriate type of Git::Object
|
749
|
-
def object(objectish); end
|
750
|
-
|
751
|
-
# @return [Git::Remote] a remote of the specified name
|
752
|
-
def remote(remote_name = T.unsafe(nil)); end
|
753
|
-
|
754
|
-
# @return [Git::Status] a status object
|
755
|
-
def status; end
|
756
|
-
|
757
|
-
# @return [Git::Object::Tag] a tag object
|
758
|
-
def tag(tag_name); end
|
759
|
-
|
760
|
-
# returns a Git::Worktree object for dir, commitish
|
761
|
-
def worktree(dir, commitish = T.unsafe(nil)); end
|
762
|
-
|
763
|
-
# returns a Git::worktrees object of all the Git::Worktrees
|
764
|
-
# objects for this repo
|
765
|
-
def worktrees; end
|
766
|
-
end
|
767
|
-
|
768
|
-
class Git::Branch < ::Git::Path
|
769
|
-
# @return [Branch] a new instance of Branch
|
770
|
-
def initialize(base, name); end
|
771
|
-
|
772
|
-
def archive(file, opts = T.unsafe(nil)); end
|
773
|
-
def checkout; end
|
774
|
-
|
775
|
-
# @return [Boolean]
|
776
|
-
def contains?(commit); end
|
777
|
-
|
778
|
-
def create; end
|
779
|
-
def current; end
|
780
|
-
def delete; end
|
781
|
-
|
782
|
-
# Returns the value of attribute full.
|
783
|
-
def full; end
|
784
|
-
|
785
|
-
# Sets the attribute full
|
786
|
-
#
|
787
|
-
# @param value the value to set the attribute full to.
|
788
|
-
def full=(_arg0); end
|
789
|
-
|
790
|
-
def gcommit; end
|
791
|
-
|
792
|
-
# g.branch('new_branch').in_branch do
|
793
|
-
# # create new file
|
794
|
-
# # do other stuff
|
795
|
-
# return true # auto commits and switches back
|
796
|
-
# end
|
797
|
-
def in_branch(message = T.unsafe(nil)); end
|
798
|
-
|
799
|
-
def merge(branch = T.unsafe(nil), message = T.unsafe(nil)); end
|
800
|
-
|
801
|
-
# Returns the value of attribute name.
|
802
|
-
def name; end
|
803
|
-
|
804
|
-
# Sets the attribute name
|
805
|
-
#
|
806
|
-
# @param value the value to set the attribute name to.
|
807
|
-
def name=(_arg0); end
|
808
|
-
|
809
|
-
# Returns the value of attribute remote.
|
810
|
-
def remote; end
|
811
|
-
|
812
|
-
# Sets the attribute remote
|
813
|
-
#
|
814
|
-
# @param value the value to set the attribute remote to.
|
815
|
-
def remote=(_arg0); end
|
816
|
-
|
817
|
-
def stashes; end
|
818
|
-
def to_a; end
|
819
|
-
def to_s; end
|
820
|
-
def update_ref(commit); end
|
821
|
-
|
822
|
-
private
|
823
|
-
|
824
|
-
def check_if_create; end
|
825
|
-
def determine_current; end
|
826
|
-
|
827
|
-
# Given a full branch name return an Array containing the remote and branch names.
|
828
|
-
#
|
829
|
-
# Removes 'remotes' from the beggining of the name (if present).
|
830
|
-
# Takes the second part (splittign by '/') as the remote name.
|
831
|
-
# Takes the rest as the repo name (can also hold one or more '/').
|
832
|
-
#
|
833
|
-
# Example:
|
834
|
-
# parse_name('master') #=> [nil, 'master']
|
835
|
-
# parse_name('origin/master') #=> ['origin', 'master']
|
836
|
-
# parse_name('remotes/origin/master') #=> ['origin', 'master']
|
837
|
-
# parse_name('origin/master/v2') #=> ['origin', 'master/v2']
|
838
|
-
#
|
839
|
-
# param [String] name branch full name.
|
840
|
-
# return [<Git::Remote,NilClass,String>] an Array containing the remote and branch names.
|
841
|
-
def parse_name(name); end
|
842
|
-
end
|
843
|
-
|
844
|
-
# object that holds all the available branches
|
845
|
-
class Git::Branches
|
846
|
-
include ::Enumerable
|
847
|
-
|
848
|
-
# @return [Branches] a new instance of Branches
|
849
|
-
def initialize(base); end
|
850
|
-
|
851
|
-
# Returns the target branch
|
852
|
-
#
|
853
|
-
# Example:
|
854
|
-
# Given (git branch -a):
|
855
|
-
# master
|
856
|
-
# remotes/working/master
|
857
|
-
#
|
858
|
-
# g.branches['master'].full #=> 'master'
|
859
|
-
# g.branches['working/master'].full => 'remotes/working/master'
|
860
|
-
# g.branches['remotes/working/master'].full => 'remotes/working/master'
|
861
|
-
#
|
862
|
-
# @param branch_name [#to_s] the target branch name.
|
863
|
-
# @return [Git::Branch] the target branch.
|
864
|
-
def [](branch_name); end
|
865
|
-
|
866
|
-
def each(&block); end
|
867
|
-
def local; end
|
868
|
-
def remote; end
|
869
|
-
|
870
|
-
# array like methods
|
871
|
-
def size; end
|
872
|
-
|
873
|
-
def to_s; end
|
874
|
-
end
|
875
|
-
|
876
|
-
class Git::Config
|
877
|
-
# @return [Config] a new instance of Config
|
878
|
-
def initialize; end
|
879
|
-
|
880
|
-
def binary_path; end
|
881
|
-
|
882
|
-
# Sets the attribute binary_path
|
883
|
-
#
|
884
|
-
# @param value the value to set the attribute binary_path to.
|
885
|
-
def binary_path=(_arg0); end
|
886
|
-
|
887
|
-
def git_ssh; end
|
888
|
-
|
889
|
-
# Sets the attribute git_ssh
|
890
|
-
#
|
891
|
-
# @param value the value to set the attribute git_ssh to.
|
892
|
-
def git_ssh=(_arg0); end
|
893
|
-
end
|
894
|
-
|
895
|
-
# object that holds the last X commits on given branch
|
896
|
-
class Git::Diff
|
897
|
-
include ::Enumerable
|
898
|
-
|
899
|
-
# @return [Diff] a new instance of Diff
|
900
|
-
def initialize(base, from = T.unsafe(nil), to = T.unsafe(nil)); end
|
901
|
-
|
902
|
-
# enumerable methods
|
903
|
-
def [](key); end
|
904
|
-
|
905
|
-
def deletions; end
|
906
|
-
|
907
|
-
# :yields: each Git::DiffFile in turn
|
908
|
-
def each(&block); end
|
909
|
-
|
910
|
-
# Returns the value of attribute from.
|
911
|
-
def from; end
|
912
|
-
|
913
|
-
def insertions; end
|
914
|
-
def lines; end
|
915
|
-
def name_status; end
|
916
|
-
|
917
|
-
# if file is provided and is writable, it will write the patch into the file
|
918
|
-
def patch(file = T.unsafe(nil)); end
|
919
|
-
|
920
|
-
def path(path); end
|
921
|
-
def size; end
|
922
|
-
def stats; end
|
923
|
-
|
924
|
-
# Returns the value of attribute to.
|
925
|
-
def to; end
|
926
|
-
|
927
|
-
# if file is provided and is writable, it will write the patch into the file
|
928
|
-
def to_s(file = T.unsafe(nil)); end
|
929
|
-
|
930
|
-
private
|
931
|
-
|
932
|
-
def cache_full; end
|
933
|
-
def cache_name_status; end
|
934
|
-
def cache_stats; end
|
935
|
-
def process_full; end
|
936
|
-
|
937
|
-
# break up @diff_full
|
938
|
-
def process_full_diff; end
|
939
|
-
end
|
940
|
-
|
941
|
-
class Git::Diff::DiffFile
|
942
|
-
# @return [DiffFile] a new instance of DiffFile
|
943
|
-
def initialize(base, hash); end
|
944
|
-
|
945
|
-
# @return [Boolean]
|
946
|
-
def binary?; end
|
947
|
-
|
948
|
-
def blob(type = T.unsafe(nil)); end
|
949
|
-
|
950
|
-
# Returns the value of attribute dst.
|
951
|
-
def dst; end
|
952
|
-
|
953
|
-
# Sets the attribute dst
|
954
|
-
#
|
955
|
-
# @param value the value to set the attribute dst to.
|
956
|
-
def dst=(_arg0); end
|
957
|
-
|
958
|
-
# Returns the value of attribute mode.
|
959
|
-
def mode; end
|
960
|
-
|
961
|
-
# Sets the attribute mode
|
962
|
-
#
|
963
|
-
# @param value the value to set the attribute mode to.
|
964
|
-
def mode=(_arg0); end
|
965
|
-
|
966
|
-
# Returns the value of attribute patch.
|
967
|
-
def patch; end
|
968
|
-
|
969
|
-
# Sets the attribute patch
|
970
|
-
#
|
971
|
-
# @param value the value to set the attribute patch to.
|
972
|
-
def patch=(_arg0); end
|
973
|
-
|
974
|
-
# Returns the value of attribute path.
|
975
|
-
def path; end
|
976
|
-
|
977
|
-
# Sets the attribute path
|
978
|
-
#
|
979
|
-
# @param value the value to set the attribute path to.
|
980
|
-
def path=(_arg0); end
|
981
|
-
|
982
|
-
# Returns the value of attribute src.
|
983
|
-
def src; end
|
984
|
-
|
985
|
-
# Sets the attribute src
|
986
|
-
#
|
987
|
-
# @param value the value to set the attribute src to.
|
988
|
-
def src=(_arg0); end
|
989
|
-
|
990
|
-
# Returns the value of attribute type.
|
991
|
-
def type; end
|
992
|
-
|
993
|
-
# Sets the attribute type
|
994
|
-
#
|
995
|
-
# @param value the value to set the attribute type to.
|
996
|
-
def type=(_arg0); end
|
997
|
-
end
|
998
|
-
|
999
|
-
Git::Diff::DiffFile::NIL_BLOB_REGEXP = T.let(T.unsafe(nil), Regexp)
|
1000
|
-
|
1001
|
-
# Method that can be used to detect and normalize string encoding
|
1002
|
-
module Git::EncodingUtils
|
1003
|
-
class << self
|
1004
|
-
def best_guess_encoding; end
|
1005
|
-
def default_encoding; end
|
1006
|
-
def detected_encoding(str); end
|
1007
|
-
def encoding_options; end
|
1008
|
-
def normalize_encoding(str); end
|
1009
|
-
end
|
1010
|
-
end
|
1011
|
-
|
1012
|
-
# Represents an escaped Git path string
|
1013
|
-
#
|
1014
|
-
# Git commands that output paths (e.g. ls-files, diff), will escape usual
|
1015
|
-
# characters in the path with backslashes in the same way C escapes control
|
1016
|
-
# characters (e.g. \t for TAB, \n for LF, \\ for backslash) or bytes with values
|
1017
|
-
# larger than 0x80 (e.g. octal \302\265 for "micro" in UTF-8).
|
1018
|
-
#
|
1019
|
-
# @example
|
1020
|
-
# Git::GitPath.new('\302\265').unescape # => "µ"
|
1021
|
-
class Git::EscapedPath
|
1022
|
-
# @return [EscapedPath] a new instance of EscapedPath
|
1023
|
-
def initialize(path); end
|
1024
|
-
|
1025
|
-
# Returns the value of attribute path.
|
1026
|
-
def path; end
|
1027
|
-
|
1028
|
-
# Convert an escaped path to an unescaped path
|
1029
|
-
def unescape; end
|
1030
|
-
|
1031
|
-
private
|
1032
|
-
|
1033
|
-
def escaped_path_to_bytes(path); end
|
1034
|
-
def extract_escape(path, index); end
|
1035
|
-
def extract_octal(path, index); end
|
1036
|
-
def extract_single_char(path, index); end
|
1037
|
-
def next_byte(path, index); end
|
1038
|
-
end
|
1039
|
-
|
1040
|
-
Git::EscapedPath::UNESCAPES = T.let(T.unsafe(nil), Hash)
|
1041
|
-
|
1042
|
-
# The URI for git's alternative scp-like syntax
|
1043
|
-
#
|
1044
|
-
# This class is necessary to ensure that #to_s returns the same string
|
1045
|
-
# that was passed to the initializer.
|
1046
|
-
#
|
1047
|
-
# @api public
|
1048
|
-
class Git::GitAltURI < ::Addressable::URI
|
1049
|
-
# Create a new GitAltURI object
|
1050
|
-
#
|
1051
|
-
# @api public
|
1052
|
-
# @example
|
1053
|
-
# uri = Git::GitAltURI.new(user: 'james', host: 'github.com', path: 'james/ruby-git')
|
1054
|
-
# uri.to_s #=> 'james@github.com/james/ruby-git'
|
1055
|
-
# @param user [String, nil] the user from the URL or nil
|
1056
|
-
# @param host [String] the host from the URL
|
1057
|
-
# @param path [String] the path from the URL
|
1058
|
-
# @return [GitAltURI] a new instance of GitAltURI
|
1059
|
-
def initialize(user:, host:, path:); end
|
1060
|
-
|
1061
|
-
# Convert the URI to a String
|
1062
|
-
#
|
1063
|
-
# Addressible::URI forces path to be absolute by prepending a '/' to the
|
1064
|
-
# path. This method removes the '/' when converting back to a string
|
1065
|
-
# since that is what is expected by git. The following is a valid git URL:
|
1066
|
-
#
|
1067
|
-
# `james@github.com:ruby-git/ruby-git.git`
|
1068
|
-
#
|
1069
|
-
# and the following (with the initial '/'' in the path) is NOT a valid git URL:
|
1070
|
-
#
|
1071
|
-
# `james@github.com:/ruby-git/ruby-git.git`
|
1072
|
-
#
|
1073
|
-
# @api public
|
1074
|
-
# @example
|
1075
|
-
# uri = Git::GitAltURI.new(user: 'james', host: 'github.com', path: 'james/ruby-git')
|
1076
|
-
# uri.path #=> '/james/ruby-git'
|
1077
|
-
# uri.to_s #=> 'james@github.com:james/ruby-git'
|
1078
|
-
# @return [String] the URI as a String
|
1079
|
-
def to_s; end
|
1080
|
-
end
|
1081
|
-
|
1082
|
-
class Git::GitExecuteError < ::StandardError; end
|
1083
|
-
class Git::GitTagNameDoesNotExist < ::StandardError; end
|
1084
|
-
class Git::Index < ::Git::Path; end
|
1085
|
-
|
1086
|
-
class Git::Lib
|
1087
|
-
# Create a new Git::Lib object
|
1088
|
-
#
|
1089
|
-
# @option base
|
1090
|
-
# @option base
|
1091
|
-
# @option base
|
1092
|
-
# @param base [Git::Base, Hash] An object that passes in values for
|
1093
|
-
# @git_work_dir, @git_dir, and @git_index_file
|
1094
|
-
# @param logger [Logger]
|
1095
|
-
# @return [Lib] a new instance of Lib
|
1096
|
-
def initialize(base = T.unsafe(nil), logger = T.unsafe(nil)); end
|
1097
|
-
|
1098
|
-
# updates the repository index using the working directory content
|
1099
|
-
#
|
1100
|
-
# lib.add('path/to/file')
|
1101
|
-
# lib.add(['path/to/file1','path/to/file2'])
|
1102
|
-
# lib.add(:all => true)
|
1103
|
-
#
|
1104
|
-
# options:
|
1105
|
-
# :all => true
|
1106
|
-
# :force => true
|
1107
|
-
#
|
1108
|
-
# @param paths [String, Array] files paths to be added to the repository
|
1109
|
-
# @param options [Hash]
|
1110
|
-
def add(paths = T.unsafe(nil), options = T.unsafe(nil)); end
|
1111
|
-
|
1112
|
-
def apply(patch_file); end
|
1113
|
-
def apply_mail(patch_file); end
|
1114
|
-
|
1115
|
-
# creates an archive file
|
1116
|
-
#
|
1117
|
-
# options
|
1118
|
-
# :format (zip, tar)
|
1119
|
-
# :prefix
|
1120
|
-
# :remote
|
1121
|
-
# :path
|
1122
|
-
def archive(sha, file = T.unsafe(nil), opts = T.unsafe(nil)); end
|
1123
|
-
|
1124
|
-
def branch_contains(commit, branch_name = T.unsafe(nil)); end
|
1125
|
-
def branch_current; end
|
1126
|
-
def branch_delete(branch); end
|
1127
|
-
def branch_new(branch); end
|
1128
|
-
def branches_all; end
|
1129
|
-
def change_head_branch(branch_name); end
|
1130
|
-
def checkout(branch, opts = T.unsafe(nil)); end
|
1131
|
-
def checkout_file(version, file); end
|
1132
|
-
def checkout_index(opts = T.unsafe(nil)); end
|
1133
|
-
def clean(opts = T.unsafe(nil)); end
|
1134
|
-
|
1135
|
-
# tries to clone the given repo
|
1136
|
-
#
|
1137
|
-
# accepts options:
|
1138
|
-
# :bare:: no working directory
|
1139
|
-
# :branch:: name of branch to track (rather than 'master')
|
1140
|
-
# :depth:: the number of commits back to pull
|
1141
|
-
# :origin:: name of remote (same as remote)
|
1142
|
-
# :path:: directory where the repo will be cloned
|
1143
|
-
# :remote:: name of remote (rather than 'origin')
|
1144
|
-
# :recursive:: after the clone is created, initialize all submodules within, using their default settings.
|
1145
|
-
#
|
1146
|
-
# TODO - make this work with SSH password or auth_key
|
1147
|
-
#
|
1148
|
-
# @return [Hash] the options to pass to {Git::Base.new}
|
1149
|
-
def clone(repository_url, directory, opts = T.unsafe(nil)); end
|
1150
|
-
|
1151
|
-
# Takes the commit message with the options and executes the commit command
|
1152
|
-
#
|
1153
|
-
# accepts options:
|
1154
|
-
# :amend
|
1155
|
-
# :all
|
1156
|
-
# :allow_empty
|
1157
|
-
# :author
|
1158
|
-
# :date
|
1159
|
-
# :no_verify
|
1160
|
-
# :allow_empty_message
|
1161
|
-
# :gpg_sign (accepts true or a gpg key ID as a String)
|
1162
|
-
# :no_gpg_sign (conflicts with :gpg_sign)
|
1163
|
-
#
|
1164
|
-
# @param message [String] the commit message to be used
|
1165
|
-
# @param opts [Hash] the commit options to be used
|
1166
|
-
def commit(message, opts = T.unsafe(nil)); end
|
1167
|
-
|
1168
|
-
# returns useful array of raw commit object data
|
1169
|
-
def commit_data(sha); end
|
1170
|
-
|
1171
|
-
def commit_tree(tree, opts = T.unsafe(nil)); end
|
1172
|
-
def config_get(name); end
|
1173
|
-
def config_list; end
|
1174
|
-
def config_remote(name); end
|
1175
|
-
|
1176
|
-
# WRITE COMMANDS ##
|
1177
|
-
def config_set(name, value, options = T.unsafe(nil)); end
|
1178
|
-
|
1179
|
-
# :yields: file, your, their
|
1180
|
-
def conflicts; end
|
1181
|
-
|
1182
|
-
# returns the current version of git, as an Array of Fixnums.
|
1183
|
-
def current_command_version; end
|
1184
|
-
|
1185
|
-
# Returns most recent tag that is reachable from a commit
|
1186
|
-
#
|
1187
|
-
# accepts options:
|
1188
|
-
# :all
|
1189
|
-
# :tags
|
1190
|
-
# :contains
|
1191
|
-
# :debug
|
1192
|
-
# :exact_match
|
1193
|
-
# :dirty
|
1194
|
-
# :abbrev
|
1195
|
-
# :candidates
|
1196
|
-
# :long
|
1197
|
-
# :always
|
1198
|
-
# :math
|
1199
|
-
#
|
1200
|
-
# @param [String|NilClass] committish target commit sha or object name
|
1201
|
-
# @param [{Symbol=>Object}] opts the given options
|
1202
|
-
# @return [String] the tag name
|
1203
|
-
def describe(committish = T.unsafe(nil), opts = T.unsafe(nil)); end
|
1204
|
-
|
1205
|
-
# compares the index and the working directory
|
1206
|
-
def diff_files; end
|
1207
|
-
|
1208
|
-
def diff_full(obj1 = T.unsafe(nil), obj2 = T.unsafe(nil), opts = T.unsafe(nil)); end
|
1209
|
-
|
1210
|
-
# compares the index and the repository
|
1211
|
-
def diff_index(treeish); end
|
1212
|
-
|
1213
|
-
def diff_name_status(reference1 = T.unsafe(nil), reference2 = T.unsafe(nil), opts = T.unsafe(nil)); end
|
1214
|
-
def diff_stats(obj1 = T.unsafe(nil), obj2 = T.unsafe(nil), opts = T.unsafe(nil)); end
|
1215
|
-
def fetch(remote, opts); end
|
1216
|
-
def full_log_commits(opts = T.unsafe(nil)); end
|
1217
|
-
def full_tree(sha); end
|
1218
|
-
def gc; end
|
1219
|
-
|
1220
|
-
# The path to the Git repository directory. The default is
|
1221
|
-
# `"#{git_work_dir}/.git"`.
|
1222
|
-
#
|
1223
|
-
# @return [Pathname] the Git repository directory.
|
1224
|
-
# @see [Git repository](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefrepositoryarepository)
|
1225
|
-
def git_dir; end
|
1226
|
-
|
1227
|
-
# The Git index file used to stage changes (using `git add`) before they
|
1228
|
-
# are committed.
|
1229
|
-
#
|
1230
|
-
# @return [Pathname] the Git index file
|
1231
|
-
# @see [Git index file](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefindexaindex)
|
1232
|
-
def git_index_file; end
|
1233
|
-
|
1234
|
-
# The path to the Git working copy. The default is '"./.git"'.
|
1235
|
-
#
|
1236
|
-
# @return [Pathname] the path to the Git working copy.
|
1237
|
-
# @see [Git working tree](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefworkingtreeaworkingtree)
|
1238
|
-
def git_work_dir; end
|
1239
|
-
|
1240
|
-
def global_config_get(name); end
|
1241
|
-
def global_config_list; end
|
1242
|
-
def global_config_set(name, value); end
|
1243
|
-
|
1244
|
-
# returns hash
|
1245
|
-
# [tree-ish] = [[line_no, match], [line_no, match2]]
|
1246
|
-
# [tree-ish] = [[line_no, match], [line_no, match2]]
|
1247
|
-
def grep(string, opts = T.unsafe(nil)); end
|
1248
|
-
|
1249
|
-
def ignored_files; end
|
1250
|
-
|
1251
|
-
# creates or reinitializes the repository
|
1252
|
-
#
|
1253
|
-
# options:
|
1254
|
-
# :bare
|
1255
|
-
# :working_directory
|
1256
|
-
# :initial_branch
|
1257
|
-
def init(opts = T.unsafe(nil)); end
|
1258
|
-
|
1259
|
-
def list_files(ref_dir); end
|
1260
|
-
def log_commits(opts = T.unsafe(nil)); end
|
1261
|
-
def ls_files(location = T.unsafe(nil)); end
|
1262
|
-
def ls_remote(location = T.unsafe(nil), opts = T.unsafe(nil)); end
|
1263
|
-
def ls_tree(sha); end
|
1264
|
-
|
1265
|
-
# @return [Boolean]
|
1266
|
-
def meets_required_version?; end
|
1267
|
-
|
1268
|
-
def merge(branch, message = T.unsafe(nil), opts = T.unsafe(nil)); end
|
1269
|
-
def merge_base(*args); end
|
1270
|
-
def mv(file1, file2); end
|
1271
|
-
def namerev(string); end
|
1272
|
-
def object_contents(sha, &block); end
|
1273
|
-
def object_size(sha); end
|
1274
|
-
def object_type(sha); end
|
1275
|
-
def parse_config(file); end
|
1276
|
-
def parse_config_list(lines); end
|
1277
|
-
def process_commit_data(data, sha = T.unsafe(nil), indent = T.unsafe(nil)); end
|
1278
|
-
def process_commit_log_data(data); end
|
1279
|
-
def process_tag_data(data, name, indent = T.unsafe(nil)); end
|
1280
|
-
def pull(remote = T.unsafe(nil), branch = T.unsafe(nil)); end
|
1281
|
-
def push(remote, branch = T.unsafe(nil), opts = T.unsafe(nil)); end
|
1282
|
-
|
1283
|
-
# reads a tree into the current index file
|
1284
|
-
def read_tree(treeish, opts = T.unsafe(nil)); end
|
1285
|
-
|
1286
|
-
def remote_add(name, url, opts = T.unsafe(nil)); end
|
1287
|
-
def remote_remove(name); end
|
1288
|
-
def remote_set_url(name, url); end
|
1289
|
-
def remotes; end
|
1290
|
-
def remove(path = T.unsafe(nil), opts = T.unsafe(nil)); end
|
1291
|
-
def repack; end
|
1292
|
-
def required_command_version; end
|
1293
|
-
def reset(commit, opts = T.unsafe(nil)); end
|
1294
|
-
def return_base_opts_from_clone(clone_dir, opts); end
|
1295
|
-
def revert(commitish, opts = T.unsafe(nil)); end
|
1296
|
-
def revparse(string); end
|
1297
|
-
|
1298
|
-
# Shows objects
|
1299
|
-
#
|
1300
|
-
# @param objectish [String|NilClass] the target object reference (nil == HEAD)
|
1301
|
-
# @param path [String|NilClass] the path of the file to be shown
|
1302
|
-
# @return [String] the object information
|
1303
|
-
def show(objectish = T.unsafe(nil), path = T.unsafe(nil)); end
|
1304
|
-
|
1305
|
-
def stash_apply(id = T.unsafe(nil)); end
|
1306
|
-
def stash_clear; end
|
1307
|
-
def stash_list; end
|
1308
|
-
def stash_save(message); end
|
1309
|
-
def stashes_all; end
|
1310
|
-
def tag(name, *opts); end
|
1311
|
-
def tag_data(name); end
|
1312
|
-
def tag_sha(tag_name); end
|
1313
|
-
def tags; end
|
1314
|
-
def tree_depth(sha); end
|
1315
|
-
def unmerged; end
|
1316
|
-
def update_ref(branch, commit); end
|
1317
|
-
def worktree_add(dir, commitish = T.unsafe(nil)); end
|
1318
|
-
def worktree_prune; end
|
1319
|
-
def worktree_remove(dir); end
|
1320
|
-
def worktrees_all; end
|
1321
|
-
def write_tree; end
|
1322
|
-
|
1323
|
-
private
|
1324
|
-
|
1325
|
-
# @raise [Git::GitExecuteError]
|
1326
|
-
def command(cmd, *opts, &block); end
|
1327
|
-
|
1328
|
-
def command_lines(cmd, *opts); end
|
1329
|
-
|
1330
|
-
# Takes the diff command line output (as Array) and parse it into a Hash
|
1331
|
-
#
|
1332
|
-
# @param diff_command [String] the diff commadn to be used
|
1333
|
-
# @param opts [Array] the diff options to be used
|
1334
|
-
# @return [Hash] the diff as Hash
|
1335
|
-
def diff_as_hash(diff_command, opts = T.unsafe(nil)); end
|
1336
|
-
|
1337
|
-
def escape(s); end
|
1338
|
-
def escape_for_sh(s); end
|
1339
|
-
def escape_for_windows(s); end
|
1340
|
-
|
1341
|
-
# Returns an array holding the common options for the log commands
|
1342
|
-
#
|
1343
|
-
# @param opts [Hash] the given options
|
1344
|
-
# @return [Array] the set of common options that the log command will use
|
1345
|
-
def log_common_options(opts); end
|
1346
|
-
|
1347
|
-
# Retrurns an array holding path options for the log commands
|
1348
|
-
#
|
1349
|
-
# @param opts [Hash] the given options
|
1350
|
-
# @return [Array] the set of path options that the log command will use
|
1351
|
-
def log_path_options(opts); end
|
1352
|
-
|
1353
|
-
# Takes the previously stored git's ENV variables and set them again on ENV.
|
1354
|
-
def restore_git_system_env_variables; end
|
1355
|
-
|
1356
|
-
def run_command(git_cmd, &block); end
|
1357
|
-
|
1358
|
-
# Sets git's ENV variables to the custom values for the current instance.
|
1359
|
-
def set_custom_git_env_variables; end
|
1360
|
-
|
1361
|
-
# Takes the current git's system ENV variables and store them.
|
1362
|
-
def store_git_system_env_variables; end
|
1363
|
-
|
1364
|
-
# @return [Boolean]
|
1365
|
-
def windows_platform?; end
|
1366
|
-
|
1367
|
-
# Runs a block inside an environment with customized ENV variables.
|
1368
|
-
# It restores the ENV after execution.
|
1369
|
-
#
|
1370
|
-
# @param block [Proc] block to be executed within the customized environment
|
1371
|
-
def with_custom_env_variables(&block); end
|
1372
|
-
end
|
1373
|
-
|
1374
|
-
# Systen ENV variables involved in the git commands.
|
1375
|
-
#
|
1376
|
-
# @return [<String>] the names of the EVN variables involved in the git commands
|
1377
|
-
Git::Lib::ENV_VARIABLE_NAMES = T.let(T.unsafe(nil), Array)
|
1378
|
-
|
1379
|
-
# object that holds the last X commits on given branch
|
1380
|
-
class Git::Log
|
1381
|
-
include ::Enumerable
|
1382
|
-
|
1383
|
-
# @return [Log] a new instance of Log
|
1384
|
-
def initialize(base, count = T.unsafe(nil)); end
|
1385
|
-
|
1386
|
-
def [](index); end
|
1387
|
-
def author(regex); end
|
1388
|
-
def between(sha1, sha2 = T.unsafe(nil)); end
|
1389
|
-
def cherry; end
|
1390
|
-
def each(&block); end
|
1391
|
-
def first; end
|
1392
|
-
def grep(regex); end
|
1393
|
-
def last; end
|
1394
|
-
def object(objectish); end
|
1395
|
-
def path(path); end
|
1396
|
-
def since(date); end
|
1397
|
-
|
1398
|
-
# forces git log to run
|
1399
|
-
def size; end
|
1400
|
-
|
1401
|
-
def skip(num); end
|
1402
|
-
def to_s; end
|
1403
|
-
def until(date); end
|
1404
|
-
|
1405
|
-
private
|
1406
|
-
|
1407
|
-
def check_log; end
|
1408
|
-
def dirty_log; end
|
1409
|
-
|
1410
|
-
# actually run the 'git log' command
|
1411
|
-
def run_log; end
|
1412
|
-
end
|
1413
|
-
|
1414
|
-
# represents a git object
|
1415
|
-
class Git::Object
|
1416
|
-
class << self
|
1417
|
-
# if we're calling this, we don't know what type it is yet
|
1418
|
-
# so this is our little factory method
|
1419
|
-
def new(base, objectish, type = T.unsafe(nil), is_tag = T.unsafe(nil)); end
|
1420
|
-
end
|
1421
|
-
end
|
1422
|
-
|
1423
|
-
class Git::Object::AbstractObject
|
1424
|
-
# @return [AbstractObject] a new instance of AbstractObject
|
1425
|
-
def initialize(base, objectish); end
|
1426
|
-
|
1427
|
-
# creates an archive of this object (tree)
|
1428
|
-
def archive(file = T.unsafe(nil), opts = T.unsafe(nil)); end
|
1429
|
-
|
1430
|
-
# @return [Boolean]
|
1431
|
-
def blob?; end
|
1432
|
-
|
1433
|
-
# @return [Boolean]
|
1434
|
-
def commit?; end
|
1435
|
-
|
1436
|
-
# Get the object's contents.
|
1437
|
-
# If no block is given, the contents are cached in memory and returned as a string.
|
1438
|
-
# If a block is given, it yields an IO object (via IO::popen) which could be used to
|
1439
|
-
# read a large file in chunks.
|
1440
|
-
#
|
1441
|
-
# Use this for large files so that they are not held in memory.
|
1442
|
-
def contents(&block); end
|
1443
|
-
|
1444
|
-
def contents_array; end
|
1445
|
-
def diff(objectish); end
|
1446
|
-
def grep(string, path_limiter = T.unsafe(nil), opts = T.unsafe(nil)); end
|
1447
|
-
def log(count = T.unsafe(nil)); end
|
1448
|
-
|
1449
|
-
# Returns the value of attribute mode.
|
1450
|
-
def mode; end
|
1451
|
-
|
1452
|
-
# Sets the attribute mode
|
1453
|
-
#
|
1454
|
-
# @param value the value to set the attribute mode to.
|
1455
|
-
def mode=(_arg0); end
|
1456
|
-
|
1457
|
-
# Returns the value of attribute objectish.
|
1458
|
-
def objectish; end
|
1459
|
-
|
1460
|
-
# Sets the attribute objectish
|
1461
|
-
#
|
1462
|
-
# @param value the value to set the attribute objectish to.
|
1463
|
-
def objectish=(_arg0); end
|
1464
|
-
|
1465
|
-
def sha; end
|
1466
|
-
def size; end
|
1467
|
-
|
1468
|
-
# Sets the attribute size
|
1469
|
-
#
|
1470
|
-
# @param value the value to set the attribute size to.
|
1471
|
-
def size=(_arg0); end
|
1472
|
-
|
1473
|
-
# @return [Boolean]
|
1474
|
-
def tag?; end
|
1475
|
-
|
1476
|
-
def to_s; end
|
1477
|
-
|
1478
|
-
# @return [Boolean]
|
1479
|
-
def tree?; end
|
1480
|
-
|
1481
|
-
# Returns the value of attribute type.
|
1482
|
-
def type; end
|
1483
|
-
|
1484
|
-
# Sets the attribute type
|
1485
|
-
#
|
1486
|
-
# @param value the value to set the attribute type to.
|
1487
|
-
def type=(_arg0); end
|
1488
|
-
end
|
1489
|
-
|
1490
|
-
class Git::Object::Blob < ::Git::Object::AbstractObject
|
1491
|
-
# @return [Blob] a new instance of Blob
|
1492
|
-
def initialize(base, sha, mode = T.unsafe(nil)); end
|
1493
|
-
|
1494
|
-
# @return [Boolean]
|
1495
|
-
def blob?; end
|
1496
|
-
end
|
1497
|
-
|
1498
|
-
class Git::Object::Commit < ::Git::Object::AbstractObject
|
1499
|
-
# @return [Commit] a new instance of Commit
|
1500
|
-
def initialize(base, sha, init = T.unsafe(nil)); end
|
1501
|
-
|
1502
|
-
# git author
|
1503
|
-
def author; end
|
1504
|
-
|
1505
|
-
def author_date; end
|
1506
|
-
|
1507
|
-
# @return [Boolean]
|
1508
|
-
def commit?; end
|
1509
|
-
|
1510
|
-
# git author
|
1511
|
-
def committer; end
|
1512
|
-
|
1513
|
-
def committer_date; end
|
1514
|
-
def date; end
|
1515
|
-
def diff_parent; end
|
1516
|
-
def gtree; end
|
1517
|
-
def message; end
|
1518
|
-
def name; end
|
1519
|
-
def parent; end
|
1520
|
-
|
1521
|
-
# array of all parent commits
|
1522
|
-
def parents; end
|
1523
|
-
|
1524
|
-
def set_commit(data); end
|
1525
|
-
|
1526
|
-
private
|
1527
|
-
|
1528
|
-
# see if this object has been initialized and do so if not
|
1529
|
-
def check_commit; end
|
1530
|
-
end
|
1531
|
-
|
1532
|
-
class Git::Object::Tag < ::Git::Object::AbstractObject
|
1533
|
-
# @return [Tag] a new instance of Tag
|
1534
|
-
def initialize(base, sha, name); end
|
1535
|
-
|
1536
|
-
# @return [Boolean]
|
1537
|
-
def annotated?; end
|
1538
|
-
|
1539
|
-
def message; end
|
1540
|
-
|
1541
|
-
# Returns the value of attribute name.
|
1542
|
-
def name; end
|
1543
|
-
|
1544
|
-
# Sets the attribute name
|
1545
|
-
#
|
1546
|
-
# @param value the value to set the attribute name to.
|
1547
|
-
def name=(_arg0); end
|
1548
|
-
|
1549
|
-
# @return [Boolean]
|
1550
|
-
def tag?; end
|
1551
|
-
|
1552
|
-
def tagger; end
|
1553
|
-
|
1554
|
-
private
|
1555
|
-
|
1556
|
-
def check_tag; end
|
1557
|
-
end
|
1558
|
-
|
1559
|
-
class Git::Object::Tree < ::Git::Object::AbstractObject
|
1560
|
-
# @return [Tree] a new instance of Tree
|
1561
|
-
def initialize(base, sha, mode = T.unsafe(nil)); end
|
1562
|
-
|
1563
|
-
def blobs; end
|
1564
|
-
def children; end
|
1565
|
-
def depth; end
|
1566
|
-
def files; end
|
1567
|
-
def full_tree; end
|
1568
|
-
def subdirectories; end
|
1569
|
-
def subtrees; end
|
1570
|
-
|
1571
|
-
# @return [Boolean]
|
1572
|
-
def tree?; end
|
1573
|
-
|
1574
|
-
def trees; end
|
1575
|
-
|
1576
|
-
private
|
1577
|
-
|
1578
|
-
# actually run the git command
|
1579
|
-
def check_tree; end
|
1580
|
-
end
|
1581
|
-
|
1582
|
-
class Git::Path
|
1583
|
-
# @return [Path] a new instance of Path
|
1584
|
-
def initialize(path, check_path = T.unsafe(nil)); end
|
1585
|
-
|
1586
|
-
# Returns the value of attribute path.
|
1587
|
-
def path; end
|
1588
|
-
|
1589
|
-
# Sets the attribute path
|
1590
|
-
#
|
1591
|
-
# @param value the value to set the attribute path to.
|
1592
|
-
def path=(_arg0); end
|
1593
|
-
|
1594
|
-
# @return [Boolean]
|
1595
|
-
def readable?; end
|
1596
|
-
|
1597
|
-
def to_s; end
|
1598
|
-
|
1599
|
-
# @return [Boolean]
|
1600
|
-
def writable?; end
|
1601
|
-
end
|
1602
|
-
|
1603
|
-
class Git::Remote < ::Git::Path
|
1604
|
-
# @return [Remote] a new instance of Remote
|
1605
|
-
def initialize(base, name); end
|
1606
|
-
|
1607
|
-
def branch(branch = T.unsafe(nil)); end
|
1608
|
-
def fetch(opts = T.unsafe(nil)); end
|
1609
|
-
|
1610
|
-
# Returns the value of attribute fetch_opts.
|
1611
|
-
def fetch_opts; end
|
1612
|
-
|
1613
|
-
# Sets the attribute fetch_opts
|
1614
|
-
#
|
1615
|
-
# @param value the value to set the attribute fetch_opts to.
|
1616
|
-
def fetch_opts=(_arg0); end
|
1617
|
-
|
1618
|
-
# merge this remote locally
|
1619
|
-
def merge(branch = T.unsafe(nil)); end
|
1620
|
-
|
1621
|
-
# Returns the value of attribute name.
|
1622
|
-
def name; end
|
1623
|
-
|
1624
|
-
# Sets the attribute name
|
1625
|
-
#
|
1626
|
-
# @param value the value to set the attribute name to.
|
1627
|
-
def name=(_arg0); end
|
1628
|
-
|
1629
|
-
def remove; end
|
1630
|
-
def to_s; end
|
1631
|
-
|
1632
|
-
# Returns the value of attribute url.
|
1633
|
-
def url; end
|
1634
|
-
|
1635
|
-
# Sets the attribute url
|
1636
|
-
#
|
1637
|
-
# @param value the value to set the attribute url to.
|
1638
|
-
def url=(_arg0); end
|
1639
|
-
end
|
1640
|
-
|
1641
|
-
class Git::Repository < ::Git::Path; end
|
1642
|
-
|
1643
|
-
class Git::Stash
|
1644
|
-
# @return [Stash] a new instance of Stash
|
1645
|
-
def initialize(base, message, existing = T.unsafe(nil)); end
|
1646
|
-
|
1647
|
-
def message; end
|
1648
|
-
def save; end
|
1649
|
-
|
1650
|
-
# @return [Boolean]
|
1651
|
-
def saved?; end
|
1652
|
-
|
1653
|
-
def to_s; end
|
1654
|
-
end
|
1655
|
-
|
1656
|
-
# object that holds all the available stashes
|
1657
|
-
class Git::Stashes
|
1658
|
-
include ::Enumerable
|
1659
|
-
|
1660
|
-
# @return [Stashes] a new instance of Stashes
|
1661
|
-
def initialize(base); end
|
1662
|
-
|
1663
|
-
def [](index); end
|
1664
|
-
|
1665
|
-
# Returns an multi-dimensional Array of elements that have been stash saved.
|
1666
|
-
# Array is based on position and name. See Example
|
1667
|
-
#
|
1668
|
-
# @example Returns Array of items that have been stashed
|
1669
|
-
# .all - [0, "testing-stash-all"]]
|
1670
|
-
# @return [Array]
|
1671
|
-
def all; end
|
1672
|
-
|
1673
|
-
def apply(index = T.unsafe(nil)); end
|
1674
|
-
def clear; end
|
1675
|
-
def each(&block); end
|
1676
|
-
def save(message); end
|
1677
|
-
def size; end
|
1678
|
-
end
|
1679
|
-
|
1680
|
-
# A class for git status
|
1681
|
-
class Git::Status
|
1682
|
-
include ::Enumerable
|
1683
|
-
|
1684
|
-
# @return [Status] a new instance of Status
|
1685
|
-
def initialize(base); end
|
1686
|
-
|
1687
|
-
# enumerable method
|
1688
|
-
def [](file); end
|
1689
|
-
|
1690
|
-
# Returns an Enumerable containing files that have been added.
|
1691
|
-
# File path starts at git base directory
|
1692
|
-
#
|
1693
|
-
# @return [Enumerable]
|
1694
|
-
def added; end
|
1695
|
-
|
1696
|
-
# Determines whether the given file has been added to the repository
|
1697
|
-
# File path starts at git base directory
|
1698
|
-
#
|
1699
|
-
# @example Check if lib/git.rb is added.
|
1700
|
-
# added?('lib/git.rb')
|
1701
|
-
# @param file [String] The name of the file.
|
1702
|
-
# @return [Boolean]
|
1703
|
-
def added?(file); end
|
1704
|
-
|
1705
|
-
# Returns an Enumerable containing files that have changed from the
|
1706
|
-
# git base directory
|
1707
|
-
#
|
1708
|
-
# @return [Enumerable]
|
1709
|
-
def changed; end
|
1710
|
-
|
1711
|
-
# Determines whether the given file has been changed.
|
1712
|
-
# File path starts at git base directory
|
1713
|
-
#
|
1714
|
-
# @example Check if lib/git.rb has changed.
|
1715
|
-
# changed?('lib/git.rb')
|
1716
|
-
# @param file [String] The name of the file.
|
1717
|
-
# @return [Boolean]
|
1718
|
-
def changed?(file); end
|
1719
|
-
|
1720
|
-
# Returns an Enumerable containing files that have been deleted.
|
1721
|
-
# File path starts at git base directory
|
1722
|
-
#
|
1723
|
-
# @return [Enumerable]
|
1724
|
-
def deleted; end
|
1725
|
-
|
1726
|
-
# Determines whether the given file has been deleted from the repository
|
1727
|
-
# File path starts at git base directory
|
1728
|
-
#
|
1729
|
-
# @example Check if lib/git.rb is deleted.
|
1730
|
-
# deleted?('lib/git.rb')
|
1731
|
-
# @param file [String] The name of the file.
|
1732
|
-
# @return [Boolean]
|
1733
|
-
def deleted?(file); end
|
1734
|
-
|
1735
|
-
def each(&block); end
|
1736
|
-
def pretty; end
|
1737
|
-
def pretty_file(file); end
|
1738
|
-
|
1739
|
-
# Returns an Enumerable containing files that are not tracked in git.
|
1740
|
-
# File path starts at git base directory
|
1741
|
-
#
|
1742
|
-
# @return [Enumerable]
|
1743
|
-
def untracked; end
|
1744
|
-
|
1745
|
-
# Determines whether the given file has is tracked by git.
|
1746
|
-
# File path starts at git base directory
|
1747
|
-
#
|
1748
|
-
# @example Check if lib/git.rb is an untracked file.
|
1749
|
-
# untracked?('lib/git.rb')
|
1750
|
-
# @param file [String] The name of the file.
|
1751
|
-
# @return [Boolean]
|
1752
|
-
def untracked?(file); end
|
1753
|
-
|
1754
|
-
private
|
1755
|
-
|
1756
|
-
def construct_status; end
|
1757
|
-
def fetch_added; end
|
1758
|
-
def fetch_modified; end
|
1759
|
-
def fetch_untracked; end
|
1760
|
-
end
|
1761
|
-
|
1762
|
-
# subclass that does heavy lifting
|
1763
|
-
class Git::Status::StatusFile
|
1764
|
-
# @return [StatusFile] a new instance of StatusFile
|
1765
|
-
def initialize(base, hash); end
|
1766
|
-
|
1767
|
-
def blob(type = T.unsafe(nil)); end
|
1768
|
-
|
1769
|
-
# Returns the value of attribute mode_index.
|
1770
|
-
def mode_index; end
|
1771
|
-
|
1772
|
-
# Sets the attribute mode_index
|
1773
|
-
#
|
1774
|
-
# @param value the value to set the attribute mode_index to.
|
1775
|
-
def mode_index=(_arg0); end
|
1776
|
-
|
1777
|
-
# Returns the value of attribute mode_repo.
|
1778
|
-
def mode_repo; end
|
1779
|
-
|
1780
|
-
# Sets the attribute mode_repo
|
1781
|
-
#
|
1782
|
-
# @param value the value to set the attribute mode_repo to.
|
1783
|
-
def mode_repo=(_arg0); end
|
1784
|
-
|
1785
|
-
# Returns the value of attribute path.
|
1786
|
-
def path; end
|
1787
|
-
|
1788
|
-
# Sets the attribute path
|
1789
|
-
#
|
1790
|
-
# @param value the value to set the attribute path to.
|
1791
|
-
def path=(_arg0); end
|
1792
|
-
|
1793
|
-
# Returns the value of attribute sha_index.
|
1794
|
-
def sha_index; end
|
1795
|
-
|
1796
|
-
# Sets the attribute sha_index
|
1797
|
-
#
|
1798
|
-
# @param value the value to set the attribute sha_index to.
|
1799
|
-
def sha_index=(_arg0); end
|
1800
|
-
|
1801
|
-
# Returns the value of attribute sha_repo.
|
1802
|
-
def sha_repo; end
|
1803
|
-
|
1804
|
-
# Sets the attribute sha_repo
|
1805
|
-
#
|
1806
|
-
# @param value the value to set the attribute sha_repo to.
|
1807
|
-
def sha_repo=(_arg0); end
|
1808
|
-
|
1809
|
-
# Returns the value of attribute stage.
|
1810
|
-
def stage; end
|
1811
|
-
|
1812
|
-
# Sets the attribute stage
|
1813
|
-
#
|
1814
|
-
# @param value the value to set the attribute stage to.
|
1815
|
-
def stage=(_arg0); end
|
1816
|
-
|
1817
|
-
# Returns the value of attribute type.
|
1818
|
-
def type; end
|
1819
|
-
|
1820
|
-
# Sets the attribute type
|
1821
|
-
#
|
1822
|
-
# @param value the value to set the attribute type to.
|
1823
|
-
def type=(_arg0); end
|
1824
|
-
|
1825
|
-
# Returns the value of attribute untracked.
|
1826
|
-
def untracked; end
|
1827
|
-
|
1828
|
-
# Sets the attribute untracked
|
1829
|
-
#
|
1830
|
-
# @param value the value to set the attribute untracked to.
|
1831
|
-
def untracked=(_arg0); end
|
1832
|
-
end
|
1833
|
-
|
1834
|
-
# Methods for parsing a Git URL
|
1835
|
-
#
|
1836
|
-
# Any URL that can be passed to `git clone` can be parsed by this class.
|
1837
|
-
#
|
1838
|
-
# @api public
|
1839
|
-
# @see https://git-scm.com/docs/git-clone#_git_urls GIT URLs
|
1840
|
-
# @see https://github.com/sporkmonger/addressable Addresable::URI
|
1841
|
-
class Git::URL
|
1842
|
-
class << self
|
1843
|
-
# The directory `git clone` would use for the repository directory for the given URL
|
1844
|
-
#
|
1845
|
-
# @api public
|
1846
|
-
# @example
|
1847
|
-
# Git::URL.clone_to('https://github.com/ruby-git/ruby-git.git') #=> 'ruby-git'
|
1848
|
-
# @param url [String] the Git URL containing the repository directory
|
1849
|
-
# @return [String] the name of the repository directory
|
1850
|
-
def clone_to(url, bare: T.unsafe(nil), mirror: T.unsafe(nil)); end
|
1851
|
-
|
1852
|
-
# Parse a Git URL and return an Addressable::URI object
|
1853
|
-
#
|
1854
|
-
# The URI returned can be converted back to a string with 'to_s'. This is
|
1855
|
-
# guaranteed to return the same URL string that was parsed.
|
1856
|
-
#
|
1857
|
-
# @api public
|
1858
|
-
# @example
|
1859
|
-
# uri = Git::URL.parse('https://github.com/ruby-git/ruby-git.git')
|
1860
|
-
# #=> #<Addressable::URI:0x44c URI:https://github.com/ruby-git/ruby-git.git>
|
1861
|
-
# uri.scheme #=> "https"
|
1862
|
-
# uri.host #=> "github.com"
|
1863
|
-
# uri.path #=> "/ruby-git/ruby-git.git"
|
1864
|
-
#
|
1865
|
-
# Git::URL.parse('/Users/James/projects/ruby-git')
|
1866
|
-
# #=> #<Addressable::URI:0x438 URI:/Users/James/projects/ruby-git>
|
1867
|
-
# @param url [String] the Git URL to parse
|
1868
|
-
# @return [Addressable::URI] the parsed URI
|
1869
|
-
def parse(url); end
|
1870
|
-
end
|
1871
|
-
end
|
1872
|
-
|
1873
|
-
# Regexp used to match a Git URL with an alternative SSH syntax
|
1874
|
-
# such as `user@host:path`
|
1875
|
-
#
|
1876
|
-
# @api public
|
1877
|
-
Git::URL::GIT_ALTERNATIVE_SSH_SYNTAX = T.let(T.unsafe(nil), Regexp)
|
1878
|
-
|
1879
|
-
# The current gem version
|
1880
|
-
#
|
1881
|
-
# @return [String] the current gem version.
|
1882
|
-
Git::VERSION = T.let(T.unsafe(nil), String)
|
1883
|
-
|
1884
|
-
class Git::WorkingDirectory < ::Git::Path; end
|
1885
|
-
|
1886
|
-
class Git::Worktree < ::Git::Path
|
1887
|
-
# @return [Worktree] a new instance of Worktree
|
1888
|
-
def initialize(base, dir, gcommit = T.unsafe(nil)); end
|
1889
|
-
|
1890
|
-
def add; end
|
1891
|
-
|
1892
|
-
# Returns the value of attribute dir.
|
1893
|
-
def dir; end
|
1894
|
-
|
1895
|
-
# Sets the attribute dir
|
1896
|
-
#
|
1897
|
-
# @param value the value to set the attribute dir to.
|
1898
|
-
def dir=(_arg0); end
|
1899
|
-
|
1900
|
-
# Returns the value of attribute full.
|
1901
|
-
def full; end
|
1902
|
-
|
1903
|
-
# Sets the attribute full
|
1904
|
-
#
|
1905
|
-
# @param value the value to set the attribute full to.
|
1906
|
-
def full=(_arg0); end
|
1907
|
-
|
1908
|
-
# Returns the value of attribute gcommit.
|
1909
|
-
def gcommit; end
|
1910
|
-
|
1911
|
-
# Sets the attribute gcommit
|
1912
|
-
#
|
1913
|
-
# @param value the value to set the attribute gcommit to.
|
1914
|
-
def gcommit=(_arg0); end
|
1915
|
-
|
1916
|
-
def remove; end
|
1917
|
-
def to_a; end
|
1918
|
-
def to_s; end
|
1919
|
-
end
|
1920
|
-
|
1921
|
-
# object that holds all the available worktrees
|
1922
|
-
class Git::Worktrees
|
1923
|
-
include ::Enumerable
|
1924
|
-
|
1925
|
-
# @return [Worktrees] a new instance of Worktrees
|
1926
|
-
def initialize(base); end
|
1927
|
-
|
1928
|
-
def [](worktree_name); end
|
1929
|
-
def each(&block); end
|
1930
|
-
def prune; end
|
1931
|
-
|
1932
|
-
# array like methods
|
1933
|
-
def size; end
|
1934
|
-
|
1935
|
-
def to_s; end
|
1936
|
-
end
|