run_processes_parallel: rename parameters for the callbacks
The refs code has a similar pattern of passing around 'struct strbuf *err', which is strictly used for error reporting. This is not the case here, as the strbuf is used to accumulate all the output (whether it is error or not) for the user. Rename it to 'out'. Suggested-by: Jonathan Nieder <jrnieder@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller committed
Feb 29, 2016 at 18:07 UTC
aa71049485c7b789fb9121c7fc2bece431bc589b
2 files changed
+7
-7
run-command.c
+2
-2
@@ -902,7 +902,7 @@ struct parallel_processes {
902
struct strbuf buffered_output; /* of finished children */
903
};
904
905
-static int default_start_failure(struct strbuf *err,
905
+static int default_start_failure(struct strbuf *out,
906
void *pp_cb,
907
void *pp_task_cb)
908
{
@@ -910,7 +910,7 @@ static int default_start_failure(struct strbuf *err,
910
}
911
912
static int default_task_finished(int result,
913
- struct strbuf *err,
913
+ struct strbuf *out,
914
void *pp_cb,
915
void *pp_task_cb)
916
{
run-command.h
+5
-5
@@ -139,7 +139,7 @@ int in_async(void);
139
* return the negative signal number.
140
*/
141
typedef int (*get_next_task_fn)(struct child_process *cp,
142
- struct strbuf *err,
142
+ struct strbuf *out,
143
void *pp_cb,
144
void **pp_task_cb);
145
@@ -148,7 +148,7 @@ typedef int (*get_next_task_fn)(struct child_process *cp,
148
* a new process.
149
*
150
* You must not write to stdout or stderr in this function. Add your
151
- * message to the strbuf err instead, which will be printed without
151
+ * message to the strbuf out instead, which will be printed without
152
* messing up the output of the other parallel processes.
153
*
154
* pp_cb is the callback cookie as passed into run_processes_parallel,
@@ -158,7 +158,7 @@ typedef int (*get_next_task_fn)(struct child_process *cp,
158
* To send a signal to other child processes for abortion, return
159
* the negative signal number.
160
*/
161
-typedef int (*start_failure_fn)(struct strbuf *err,
161
+typedef int (*start_failure_fn)(struct strbuf *out,
162
void *pp_cb,
163
void *pp_task_cb);
164
@@ -166,7 +166,7 @@ typedef int (*start_failure_fn)(struct strbuf *err,
166
* This callback is called on every child process that finished processing.
167
*
168
* You must not write to stdout or stderr in this function. Add your
169
- * message to the strbuf err instead, which will be printed without
169
+ * message to the strbuf out instead, which will be printed without
170
* messing up the output of the other parallel processes.
171
*
172
* pp_cb is the callback cookie as passed into run_processes_parallel,
@@ -177,7 +177,7 @@ typedef int (*start_failure_fn)(struct strbuf *err,
177
* the negative signal number.
178
*/
179
typedef int (*task_finished_fn)(int result,
180
- struct strbuf *err,
180
+ struct strbuf *out,
181
void *pp_cb,
182
void *pp_task_cb);
183