git 1.19.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/pull_request_template.md +8 -0
- data/.github/workflows/continuous_integration.yml +14 -20
- data/.github/workflows/experimental_continuous_integration.yml +43 -0
- data/CHANGELOG.md +54 -0
- data/CONTRIBUTING.md +22 -67
- data/README.md +147 -41
- data/RELEASING.md +49 -34
- data/git.gemspec +8 -8
- data/lib/git/base.rb +21 -8
- data/lib/git/command_line.rb +377 -0
- data/lib/git/config.rb +5 -1
- data/lib/git/errors.rb +206 -0
- data/lib/git/lib.rb +151 -153
- data/lib/git/object.rb +69 -67
- data/lib/git/version.rb +1 -1
- data/lib/git.rb +8 -7
- metadata +41 -29
- data/.github/stale.yml +0 -25
- data/Dockerfile.changelog-rs +0 -12
- data/PULL_REQUEST_TEMPLATE.md +0 -9
- data/lib/git/failed_error.rb +0 -53
- data/lib/git/git_execute_error.rb +0 -7
- data/lib/git/signaled_error.rb +0 -50
- /data/{ISSUE_TEMPLATE.md → .github/issue_template.md} +0 -0
data/lib/git/failed_error.rb
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'git/git_execute_error'
|
4
|
-
|
5
|
-
module Git
|
6
|
-
# This error is raised when a git command fails
|
7
|
-
#
|
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.
|
11
|
-
#
|
12
|
-
# @api public
|
13
|
-
#
|
14
|
-
class FailedError < Git::GitExecuteError
|
15
|
-
# Create a FailedError object
|
16
|
-
#
|
17
|
-
# Since this gem redirects stderr to stdout, the stdout of the process is used.
|
18
|
-
#
|
19
|
-
# @example
|
20
|
-
# `exit 1` # set $? appropriately for this example
|
21
|
-
# result = Git::CommandLineResult.new(%w[git status], $?, 'stdout', 'stderr')
|
22
|
-
# error = Git::FailedError.new(result)
|
23
|
-
# error.message #=>
|
24
|
-
# "[\"git\", \"status\"]\nstatus: pid 89784 exit 1\noutput: \"stdout\""
|
25
|
-
#
|
26
|
-
# @param result [Git::CommandLineResult] the result of the git command including
|
27
|
-
# the git command, status, stdout, and stderr
|
28
|
-
#
|
29
|
-
def initialize(result)
|
30
|
-
super("#{result.git_cmd}\nstatus: #{result.status}\noutput: #{result.stdout.inspect}")
|
31
|
-
@result = result
|
32
|
-
end
|
33
|
-
|
34
|
-
# @attribute [r] result
|
35
|
-
#
|
36
|
-
# The result of the git command including the git command and its status and output
|
37
|
-
#
|
38
|
-
# @example
|
39
|
-
# `exit 1` # set $? appropriately for this example
|
40
|
-
# result = Git::CommandLineResult.new(%w[git status], $?, 'stdout', 'stderr')
|
41
|
-
# error = Git::FailedError.new(result)
|
42
|
-
# error.result #=>
|
43
|
-
# #<Git::CommandLineResult:0x00000001046bd488
|
44
|
-
# @git_cmd=["git", "status"],
|
45
|
-
# @status=#<Process::Status: pid 89784 exit 1>,
|
46
|
-
# @stderr="stderr",
|
47
|
-
# @stdout="stdout">
|
48
|
-
#
|
49
|
-
# @return [Git::CommandLineResult]
|
50
|
-
#
|
51
|
-
attr_reader :result
|
52
|
-
end
|
53
|
-
end
|
data/lib/git/signaled_error.rb
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'git/git_execute_error'
|
4
|
-
|
5
|
-
module Git
|
6
|
-
# This error is raised when a git command exits because of an uncaught signal
|
7
|
-
#
|
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.
|
11
|
-
#
|
12
|
-
# @api public
|
13
|
-
#
|
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
|
50
|
-
end
|
File without changes
|