git 1.19.1 → 2.0.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/git/lib.rb CHANGED
@@ -1,14 +1,15 @@
1
1
  require 'git/failed_error'
2
+ require 'git/command_line'
2
3
  require 'logger'
4
+ require 'pp'
5
+ require 'process_executer'
6
+ require 'stringio'
3
7
  require 'tempfile'
4
8
  require 'zlib'
5
9
  require 'open3'
6
10
 
7
11
  module Git
8
12
  class Lib
9
-
10
- @@semaphore = Mutex.new
11
-
12
13
  # The path to the Git working copy. The default is '"./.git"'.
13
14
  #
14
15
  # @return [Pathname] the path to the Git working copy.
@@ -114,7 +115,7 @@ module Git
114
115
  arr_opts << repository_url
115
116
  arr_opts << clone_dir
116
117
 
117
- command('clone', *arr_opts)
118
+ command('clone', *arr_opts, timeout: opts[:timeout])
118
119
 
119
120
  return_base_opts_from_clone(clone_dir, opts)
120
121
  end
@@ -337,7 +338,19 @@ module Git
337
338
  end
338
339
 
339
340
  def object_contents(sha, &block)
340
- command('cat-file', '-p', sha, &block)
341
+ if block_given?
342
+ Tempfile.create do |file|
343
+ # If a block is given, write the output from the process to a temporary
344
+ # file and then yield the file to the block
345
+ #
346
+ command('cat-file', "-p", sha, out: file, err: file)
347
+ file.rewind
348
+ yield file
349
+ end
350
+ else
351
+ # If a block is not given, return stdout
352
+ command('cat-file', '-p', sha)
353
+ end
341
354
  end
342
355
 
343
356
  def ls_tree(sha)
@@ -474,11 +487,15 @@ module Git
474
487
  grep_opts.push('--', *opts[:path_limiter]) if opts[:path_limiter].is_a?(Array)
475
488
 
476
489
  hsh = {}
477
- command_lines('grep', *grep_opts).each do |line|
478
- if m = /(.*?)\:(\d+)\:(.*)/.match(line)
479
- hsh[m[1]] ||= []
480
- hsh[m[1]] << [m[2].to_i, m[3]]
490
+ begin
491
+ command_lines('grep', *grep_opts).each do |line|
492
+ if m = /(.*?)\:(\d+)\:(.*)/.match(line)
493
+ hsh[m[1]] ||= []
494
+ hsh[m[1]] << [m[2].to_i, m[3]]
495
+ end
481
496
  end
497
+ rescue Git::FailedError => e
498
+ raise unless e.result.status.exitstatus == 1 && e.result.stderr == ''
482
499
  end
483
500
  hsh
484
501
  end
@@ -865,16 +882,17 @@ module Git
865
882
 
866
883
  def conflicts # :yields: file, your, their
867
884
  self.unmerged.each do |f|
868
- your_tempfile = Tempfile.new("YOUR-#{File.basename(f)}")
869
- your = your_tempfile.path
870
- your_tempfile.close # free up file for git command process
871
- command('show', ":2:#{f}", redirect: "> #{escape your}")
872
-
873
- their_tempfile = Tempfile.new("THEIR-#{File.basename(f)}")
874
- their = their_tempfile.path
875
- their_tempfile.close # free up file for git command process
876
- command('show', ":3:#{f}", redirect: "> #{escape their}")
877
- yield(f, your, their)
885
+ Tempfile.create("YOUR-#{File.basename(f)}") do |your|
886
+ command('show', ":2:#{f}", out: your)
887
+ your.close
888
+
889
+ Tempfile.create("THEIR-#{File.basename(f)}") do |their|
890
+ command('show', ":3:#{f}", out: their)
891
+ their.close
892
+
893
+ yield(f, your.path, their.path)
894
+ end
895
+ end
878
896
  end
879
897
  end
880
898
 
@@ -948,7 +966,7 @@ module Git
948
966
  arr_opts << remote if remote
949
967
  arr_opts << opts[:ref] if opts[:ref]
950
968
 
951
- command('fetch', *arr_opts)
969
+ command('fetch', *arr_opts, merge: true)
952
970
  end
953
971
 
954
972
  def push(remote = nil, branch = nil, opts = nil)
@@ -1001,7 +1019,13 @@ module Git
1001
1019
  head = File.join(@git_dir, 'refs', 'tags', tag_name)
1002
1020
  return File.read(head).chomp if File.exist?(head)
1003
1021
 
1004
- command('show-ref', '--tags', '-s', tag_name)
1022
+ begin
1023
+ command('show-ref', '--tags', '-s', tag_name)
1024
+ rescue Git::FailedError => e
1025
+ raise unless e.result.status.exitstatus == 1 && e.result.stderr == ''
1026
+
1027
+ ''
1028
+ end
1005
1029
  end
1006
1030
 
1007
1031
  def repack
@@ -1026,15 +1050,12 @@ module Git
1026
1050
 
1027
1051
  def commit_tree(tree, opts = {})
1028
1052
  opts[:message] ||= "commit tree #{tree}"
1029
- t = Tempfile.new('commit-message')
1030
- t.write(opts[:message])
1031
- t.close
1032
-
1033
1053
  arr_opts = []
1034
1054
  arr_opts << tree
1035
1055
  arr_opts << '-p' << opts[:parent] if opts[:parent]
1036
- arr_opts += Array(opts[:parents]).map { |p| ['-p', p] }.flatten if opts[:parents]
1037
- command('commit-tree', *arr_opts, redirect: "< #{escape t.path}")
1056
+ Array(opts[:parents]).each { |p| arr_opts << '-p' << p } if opts[:parents]
1057
+ arr_opts << '-m' << opts[:message]
1058
+ command('commit-tree', *arr_opts)
1038
1059
  end
1039
1060
 
1040
1061
  def update_ref(ref, commit)
@@ -1080,7 +1101,11 @@ module Git
1080
1101
  arr_opts << "--remote=#{opts[:remote]}" if opts[:remote]
1081
1102
  arr_opts << sha
1082
1103
  arr_opts << '--' << opts[:path] if opts[:path]
1083
- command('archive', *arr_opts, redirect: " > #{escape file}")
1104
+
1105
+ f = File.open(file, 'wb')
1106
+ command('archive', *arr_opts, out: f)
1107
+ f.close
1108
+
1084
1109
  if opts[:add_gzip]
1085
1110
  file_content = File.read(file)
1086
1111
  Zlib::GzipWriter.open(file) do |gz|
@@ -1115,7 +1140,7 @@ module Git
1115
1140
  end
1116
1141
 
1117
1142
  def required_command_version
1118
- [1, 6]
1143
+ [2, 28]
1119
1144
  end
1120
1145
 
1121
1146
  def meets_required_version?
@@ -1133,11 +1158,6 @@ module Git
1133
1158
 
1134
1159
  private
1135
1160
 
1136
- # Systen ENV variables involved in the git commands.
1137
- #
1138
- # @return [<String>] the names of the EVN variables involved in the git commands
1139
- ENV_VARIABLE_NAMES = ['GIT_DIR', 'GIT_WORK_TREE', 'GIT_INDEX_FILE', 'GIT_SSH']
1140
-
1141
1161
  def command_lines(cmd, *opts, chdir: nil)
1142
1162
  cmd_op = command(cmd, *opts, chdir: chdir)
1143
1163
  if cmd_op.encoding.name != "UTF-8"
@@ -1148,84 +1168,72 @@ module Git
1148
1168
  op.split("\n")
1149
1169
  end
1150
1170
 
1151
- # Takes the current git's system ENV variables and store them.
1152
- def store_git_system_env_variables
1153
- @git_system_env_variables = {}
1154
- ENV_VARIABLE_NAMES.each do |env_variable_name|
1155
- @git_system_env_variables[env_variable_name] = ENV[env_variable_name]
1156
- end
1171
+ def env_overrides
1172
+ {
1173
+ 'GIT_DIR' => @git_dir,
1174
+ 'GIT_WORK_TREE' => @git_work_dir,
1175
+ 'GIT_INDEX_FILE' => @git_index_file,
1176
+ 'GIT_SSH' => Git::Base.config.git_ssh
1177
+ }
1157
1178
  end
1158
1179
 
1159
- # Takes the previously stored git's ENV variables and set them again on ENV.
1160
- def restore_git_system_env_variables
1161
- ENV_VARIABLE_NAMES.each do |env_variable_name|
1162
- ENV[env_variable_name] = @git_system_env_variables[env_variable_name]
1180
+ def global_opts
1181
+ Array.new.tap do |global_opts|
1182
+ global_opts << "--git-dir=#{@git_dir}" if !@git_dir.nil?
1183
+ global_opts << "--work-tree=#{@git_work_dir}" if !@git_work_dir.nil?
1184
+ global_opts << '-c' << 'core.quotePath=true'
1185
+ global_opts << '-c' << 'color.ui=false'
1163
1186
  end
1164
1187
  end
1165
1188
 
1166
- # Sets git's ENV variables to the custom values for the current instance.
1167
- def set_custom_git_env_variables
1168
- ENV['GIT_DIR'] = @git_dir
1169
- ENV['GIT_WORK_TREE'] = @git_work_dir
1170
- ENV['GIT_INDEX_FILE'] = @git_index_file
1171
- ENV['GIT_SSH'] = Git::Base.config.git_ssh
1189
+ def command_line
1190
+ @command_line ||=
1191
+ Git::CommandLine.new(env_overrides, Git::Base.config.binary_path, global_opts, @logger)
1172
1192
  end
1173
1193
 
1174
- # Runs a block inside an environment with customized ENV variables.
1175
- # It restores the ENV after execution.
1194
+ # Runs a git command and returns the output
1176
1195
  #
1177
- # @param [Proc] block block to be executed within the customized environment
1178
- def with_custom_env_variables(&block)
1179
- @@semaphore.synchronize do
1180
- store_git_system_env_variables()
1181
- set_custom_git_env_variables()
1182
- return block.call()
1183
- end
1184
- ensure
1185
- restore_git_system_env_variables()
1186
- end
1187
-
1188
- def command(*cmd, redirect: '', chomp: true, chdir: nil, &block)
1189
- Git::Lib.warn_if_old_command(self)
1190
-
1191
- raise 'cmd can not include a nested array' if cmd.any? { |o| o.is_a? Array }
1192
-
1193
- global_opts = []
1194
- global_opts << "--git-dir=#{@git_dir}" if !@git_dir.nil?
1195
- global_opts << "--work-tree=#{@git_work_dir}" if !@git_work_dir.nil?
1196
- global_opts << '-c' << 'core.quotePath=true'
1197
- global_opts << '-c' << 'color.ui=false'
1198
-
1199
- escaped_cmd = cmd.map { |part| escape(part) }.join(' ')
1200
-
1201
- global_opts = global_opts.map { |s| escape(s) }.join(' ')
1202
-
1203
- git_cmd = "#{Git::Base.config.binary_path} #{global_opts} #{escaped_cmd} #{redirect} 2>&1"
1204
-
1205
- output = nil
1206
-
1207
- command_thread = nil;
1208
-
1209
- status = nil
1210
-
1211
- with_custom_env_variables do
1212
- command_thread = Thread.new do
1213
- output, status = run_command(git_cmd, chdir, &block)
1214
- end
1215
- command_thread.join
1216
- end
1217
-
1218
- @logger.info(git_cmd)
1219
- @logger.debug(output)
1220
-
1221
- if status.exitstatus > 1 || (status.exitstatus == 1 && output != '')
1222
- result = Git::CommandLineResult.new(git_cmd, status, output, '')
1223
- raise Git::FailedError.new(result)
1224
- end
1225
-
1226
- output.chomp! if output && chomp && !block_given?
1227
-
1228
- output
1196
+ # @param args [Array] the git command to run and its arguments
1197
+ #
1198
+ # This should exclude the 'git' command itself and global options.
1199
+ #
1200
+ # For example, to run `git log --pretty=oneline`, you would pass `['log',
1201
+ # '--pretty=oneline']`
1202
+ #
1203
+ # @param out [String, nil] the path to a file or an IO to write the command's
1204
+ # stdout to
1205
+ #
1206
+ # @param err [String, nil] the path to a file or an IO to write the command's
1207
+ # stdout to
1208
+ #
1209
+ # @param normalize [Boolean] true to normalize the output encoding
1210
+ #
1211
+ # @param chomp [Boolean] true to remove trailing newlines from the output
1212
+ #
1213
+ # @param merge [Boolean] true to merge stdout and stderr
1214
+ #
1215
+ # @param chdir [String, nil] the directory to run the command in
1216
+ #
1217
+ # @param timeout [Numeric, nil] the maximum time to wait for the command to
1218
+ # complete
1219
+ #
1220
+ # @see Git::CommandLine#run
1221
+ #
1222
+ # @return [String] the command's stdout (or merged stdout and stderr if `merge`
1223
+ # is true)
1224
+ #
1225
+ # @raise [Git::GitExecuteError] if the command fails
1226
+ #
1227
+ # The exception's `result` attribute is a {Git::CommandLineResult} which will
1228
+ # contain the result of the command including the exit status, stdout, and
1229
+ # stderr.
1230
+ #
1231
+ # @api private
1232
+ #
1233
+ def command(*args, out: nil, err: nil, normalize: true, chomp: true, merge: false, chdir: nil, timeout: nil)
1234
+ timeout = timeout || Git.config.timeout
1235
+ result = command_line.run(*args, out: out, err: err, normalize: normalize, chomp: chomp, merge: merge, chdir: chdir, timeout: timeout)
1236
+ result.stdout
1229
1237
  end
1230
1238
 
1231
1239
  # Takes the diff command line output (as Array) and parse it into a Hash
@@ -1291,38 +1299,5 @@ module Git
1291
1299
  end
1292
1300
  arr_opts
1293
1301
  end
1294
-
1295
- def run_command(git_cmd, chdir=nil, &block)
1296
- block ||= Proc.new do |io|
1297
- io.readlines.map { |l| Git::EncodingUtils.normalize_encoding(l) }.join
1298
- end
1299
-
1300
- opts = {}
1301
- opts[:chdir] = File.expand_path(chdir) if chdir
1302
-
1303
- Open3.popen2(git_cmd, opts) do |stdin, stdout, wait_thr|
1304
- [block.call(stdout), wait_thr.value]
1305
- end
1306
- end
1307
-
1308
- def escape(s)
1309
- windows_platform? ? escape_for_windows(s) : escape_for_sh(s)
1310
- end
1311
-
1312
- def escape_for_sh(s)
1313
- "'#{s && s.to_s.gsub('\'','\'"\'"\'')}'"
1314
- end
1315
-
1316
- def escape_for_windows(s)
1317
- # Escape existing double quotes in s and then wrap the result with double quotes
1318
- escaped_string = s.to_s.gsub('"','\\"')
1319
- %Q{"#{escaped_string}"}
1320
- end
1321
-
1322
- def windows_platform?
1323
- # Check if on Windows via RUBY_PLATFORM (CRuby) and RUBY_DESCRIPTION (JRuby)
1324
- win_platform_regex = /mingw|mswin/
1325
- RUBY_PLATFORM =~ win_platform_regex || RUBY_DESCRIPTION =~ win_platform_regex
1326
- end
1327
1302
  end
1328
1303
  end
@@ -1,50 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'git/git_execute_error'
3
+ require_relative 'command_line_error'
4
4
 
5
5
  module Git
6
6
  # This error is raised when a git command exits because of an uncaught signal
7
7
  #
8
8
  # The git command executed, status, stdout, and stderr are available from this
9
- # object. The #message includes the git command, the status of the process, and
10
- # the stderr of the process.
9
+ # object.
11
10
  #
12
11
  # @api public
13
12
  #
14
- class SignaledError < Git::GitExecuteError
15
- # Create a SignaledError object
16
- #
17
- # @example
18
- # `kill -9 $$` # set $? appropriately for this example
19
- # result = Git::CommandLineResult.new(%w[git status], $?, '', "killed")
20
- # error = Git::SignaledError.new(result)
21
- # error.message #=>
22
- # "[\"git\", \"status\"]\nstatus: pid 88811 SIGKILL (signal 9)\nstderr: \"killed\""
23
- #
24
- # @param result [Git::CommandLineResult] the result of the git command including the git command, status, stdout, and stderr
25
- #
26
- def initialize(result)
27
- super("#{result.git_cmd}\nstatus: #{result.status}\nstderr: #{result.stderr.inspect}")
28
- @result = result
29
- end
30
-
31
- # @attribute [r] result
32
- #
33
- # The result of the git command including the git command, status, and output
34
- #
35
- # @example
36
- # `kill -9 $$` # set $? appropriately for this example
37
- # result = Git::CommandLineResult.new(%w[git status], $?, '', "killed")
38
- # error = Git::SignaledError.new(result)
39
- # error.result #=>
40
- # #<Git::CommandLineResult:0x000000010470f6e8
41
- # @git_cmd=["git", "status"],
42
- # @status=#<Process::Status: pid 88811 SIGKILL (signal 9)>,
43
- # @stderr="killed",
44
- # @stdout="">
45
- #
46
- # @return [Git::CommandLineResult]
47
- #
48
- attr_reader :result
49
- end
13
+ class SignaledError < Git::CommandLineError; end
50
14
  end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'signaled_error'
4
+
5
+ module Git
6
+ # This error is raised when a git command takes longer than the configured timeout
7
+ #
8
+ # The git command executed, status, stdout, and stderr, and the timeout duration
9
+ # are available from this object.
10
+ #
11
+ # result.status.timeout? will be `true`
12
+ #
13
+ # @api public
14
+ #
15
+ class TimeoutError < Git::SignaledError
16
+ # Create a TimeoutError object
17
+ #
18
+ # @example
19
+ # command = %w[sleep 10]
20
+ # timeout_duration = 1
21
+ # status = ProcessExecuter.spawn(*command, timeout: timeout_duration)
22
+ # result = Git::CommandLineResult.new(command, status, 'stdout', 'err output')
23
+ # error = Git::TimeoutError.new(result, timeout_duration)
24
+ # error.to_s #=> '["sleep", "10"], status: pid 70144 SIGKILL (signal 9), stderr: "err output", timed out after 1s'
25
+ #
26
+ # @param result [Git::CommandLineResult] the result of the git command including
27
+ # the git command, status, stdout, and stderr
28
+ #
29
+ # @param timeout_duration [Numeric] the amount of time the subprocess was allowed
30
+ # to run before being killed
31
+ #
32
+ def initialize(result, timeout_duration)
33
+ @timeout_duration = timeout_duration
34
+ super(result)
35
+ end
36
+
37
+ # The human readable representation of this error
38
+ #
39
+ # @example
40
+ # error.to_s #=> '["sleep", "10"], status: pid 88811 SIGKILL (signal 9), stderr: "err output", timed out after 1s'
41
+ #
42
+ # @return [String]
43
+ #
44
+ def to_s = <<~MESSAGE.chomp
45
+ #{super}, timed out after #{timeout_duration}s
46
+ MESSAGE
47
+
48
+ # The amount of time the subprocess was allowed to run before being killed
49
+ #
50
+ # @example
51
+ # `kill -9 $$` # set $? appropriately for this example
52
+ # result = Git::CommandLineResult.new(%w[git status], $?, '', "killed")
53
+ # error = Git::TimeoutError.new(result, 10)
54
+ # error.timeout_duration #=> 10
55
+ #
56
+ # @return [Numeric]
57
+ #
58
+ attr_reader :timeout_duration
59
+ end
60
+ end
data/lib/git/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  # The current gem version
3
3
  # @return [String] the current gem version.
4
- VERSION='1.19.1'
4
+ VERSION='2.0.0.pre2'
5
5
  end
data/lib/git.rb CHANGED
@@ -7,10 +7,13 @@ require 'git/author'
7
7
  require 'git/base'
8
8
  require 'git/branch'
9
9
  require 'git/branches'
10
+ require 'git/command_line_error'
10
11
  require 'git/command_line_result'
12
+ require 'git/command_line'
11
13
  require 'git/config'
12
14
  require 'git/diff'
13
15
  require 'git/encoding_utils'
16
+ require 'git/error'
14
17
  require 'git/escaped_path'
15
18
  require 'git/failed_error'
16
19
  require 'git/git_execute_error'
@@ -25,6 +28,7 @@ require 'git/signaled_error'
25
28
  require 'git/status'
26
29
  require 'git/stash'
27
30
  require 'git/stashes'
31
+ require 'git/timeout_error'
28
32
  require 'git/url'
29
33
  require 'git/version'
30
34
  require 'git/working_directory'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.1
4
+ version: 2.0.0.pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon and others
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-13 00:00:00.000000000 Z
11
+ date: 2024-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -25,47 +25,33 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.8'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rchardet
28
+ name: process_executer
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.8'
33
+ version: '1.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.8'
40
+ version: '1.1'
41
41
  - !ruby/object:Gem::Dependency
42
- name: bump
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '0.10'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '0.10'
55
- - !ruby/object:Gem::Dependency
56
- name: create_github_release
42
+ name: rchardet
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: '0.2'
62
- type: :development
47
+ version: '1.8'
48
+ type: :runtime
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: '0.2'
54
+ version: '1.8'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: minitar
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -100,42 +86,42 @@ dependencies:
100
86
  requirements:
101
87
  - - "~>"
102
88
  - !ruby/object:Gem::Version
103
- version: '13.0'
89
+ version: '13.1'
104
90
  type: :development
105
91
  prerelease: false
106
92
  version_requirements: !ruby/object:Gem::Requirement
107
93
  requirements:
108
94
  - - "~>"
109
95
  - !ruby/object:Gem::Version
110
- version: '13.0'
96
+ version: '13.1'
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: test-unit
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
101
  - - "~>"
116
102
  - !ruby/object:Gem::Version
117
- version: '3.3'
103
+ version: '3.6'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
108
  - - "~>"
123
109
  - !ruby/object:Gem::Version
124
- version: '3.3'
110
+ version: '3.6'
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: redcarpet
127
113
  requirement: !ruby/object:Gem::Requirement
128
114
  requirements:
129
115
  - - "~>"
130
116
  - !ruby/object:Gem::Version
131
- version: '3.5'
117
+ version: '3.6'
132
118
  type: :development
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
122
  - - "~>"
137
123
  - !ruby/object:Gem::Version
138
- version: '3.5'
124
+ version: '3.6'
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: yard
141
127
  requirement: !ruby/object:Gem::Requirement
@@ -203,10 +189,13 @@ files:
203
189
  - lib/git/base/factory.rb
204
190
  - lib/git/branch.rb
205
191
  - lib/git/branches.rb
192
+ - lib/git/command_line.rb
193
+ - lib/git/command_line_error.rb
206
194
  - lib/git/command_line_result.rb
207
195
  - lib/git/config.rb
208
196
  - lib/git/diff.rb
209
197
  - lib/git/encoding_utils.rb
198
+ - lib/git/error.rb
210
199
  - lib/git/escaped_path.rb
211
200
  - lib/git/failed_error.rb
212
201
  - lib/git/git_execute_error.rb
@@ -221,6 +210,7 @@ files:
221
210
  - lib/git/stash.rb
222
211
  - lib/git/stashes.rb
223
212
  - lib/git/status.rb
213
+ - lib/git/timeout_error.rb
224
214
  - lib/git/url.rb
225
215
  - lib/git/version.rb
226
216
  - lib/git/working_directory.rb
@@ -232,8 +222,8 @@ licenses:
232
222
  metadata:
233
223
  homepage_uri: http://github.com/ruby-git/ruby-git
234
224
  source_code_uri: http://github.com/ruby-git/ruby-git
235
- changelog_uri: https://rubydoc.info/gems/git/1.19.1/file/CHANGELOG.md
236
- documentation_uri: https://rubydoc.info/gems/git/1.19.1
225
+ changelog_uri: https://rubydoc.info/gems/git/2.0.0.pre2/file/CHANGELOG.md
226
+ documentation_uri: https://rubydoc.info/gems/git/2.0.0.pre2
237
227
  post_install_message:
238
228
  rdoc_options: []
239
229
  require_paths:
@@ -242,14 +232,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
242
232
  requirements:
243
233
  - - ">="
244
234
  - !ruby/object:Gem::Version
245
- version: '2.3'
235
+ version: 3.0.0
246
236
  required_rubygems_version: !ruby/object:Gem::Requirement
247
237
  requirements:
248
238
  - - ">="
249
239
  - !ruby/object:Gem::Version
250
240
  version: '0'
251
241
  requirements:
252
- - git 1.6.0.0, or greater
242
+ - git 2.28.0 or greater
253
243
  rubygems_version: 3.5.3
254
244
  signing_key:
255
245
  specification_version: 4