File tree 1 file changed +4
-13
lines changed
src/main/groovy/net/minecrell/gitpatcher
1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -70,37 +70,28 @@ class Git {
70
70
assert result == 0 , ' Process returned error code'
71
71
}
72
72
73
- void setup (OutputStream out , OutputStream err ) {
74
- if (out) {
75
- process. consumeProcessOutputStream(out)
76
- }
77
- if (err) {
78
- process. consumeProcessErrorStream(err)
79
- }
80
- }
81
-
82
73
void writeTo (OutputStream out ) {
83
- setup (out, System . err)
74
+ process . consumeProcessOutput (out, System . err)
84
75
execute()
85
76
}
86
77
87
78
void forceWriteTo (OutputStream out ) {
88
- setup (out, out)
79
+ process . consumeProcessOutput (out, out)
89
80
run()
90
81
}
91
82
92
83
def rightShift = this . &writeTo
93
84
def rightShiftUnsigned = this . &forceWriteTo
94
85
95
86
String getText () {
96
- setup( null , System . err)
87
+ process . consumeProcessErrorStream(( OutputStream ) System . err)
97
88
def text = process. inputStream. text. trim()
98
89
execute()
99
90
return text
100
91
}
101
92
102
93
String readText () {
103
- setup( null , System . err)
94
+ process . consumeProcessErrorStream(( OutputStream ) System . err)
104
95
def text = process. inputStream. text. trim()
105
96
return run() == 0 ? text : null
106
97
}
You can’t perform that action at this time.
0 commit comments