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.
@@ -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
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Git
4
- # This error is raised when a git command fails
5
- #
6
- class GitExecuteError < StandardError; end
7
- end
@@ -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