Skip to content

Commit aa71049

Browse files
stefanbellergitster
authored andcommitted
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 <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2dac9b5 commit aa71049

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

run-command.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,15 +902,15 @@ struct parallel_processes {
902902
struct strbuf buffered_output; /* of finished children */
903903
};
904904

905-
static int default_start_failure(struct strbuf *err,
905+
static int default_start_failure(struct strbuf *out,
906906
void *pp_cb,
907907
void *pp_task_cb)
908908
{
909909
return 0;
910910
}
911911

912912
static int default_task_finished(int result,
913-
struct strbuf *err,
913+
struct strbuf *out,
914914
void *pp_cb,
915915
void *pp_task_cb)
916916
{

run-command.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ int in_async(void);
139139
* return the negative signal number.
140140
*/
141141
typedef int (*get_next_task_fn)(struct child_process *cp,
142-
struct strbuf *err,
142+
struct strbuf *out,
143143
void *pp_cb,
144144
void **pp_task_cb);
145145

@@ -148,7 +148,7 @@ typedef int (*get_next_task_fn)(struct child_process *cp,
148148
* a new process.
149149
*
150150
* 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
152152
* messing up the output of the other parallel processes.
153153
*
154154
* pp_cb is the callback cookie as passed into run_processes_parallel,
@@ -158,15 +158,15 @@ typedef int (*get_next_task_fn)(struct child_process *cp,
158158
* To send a signal to other child processes for abortion, return
159159
* the negative signal number.
160160
*/
161-
typedef int (*start_failure_fn)(struct strbuf *err,
161+
typedef int (*start_failure_fn)(struct strbuf *out,
162162
void *pp_cb,
163163
void *pp_task_cb);
164164

165165
/**
166166
* This callback is called on every child process that finished processing.
167167
*
168168
* 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
170170
* messing up the output of the other parallel processes.
171171
*
172172
* pp_cb is the callback cookie as passed into run_processes_parallel,
@@ -177,7 +177,7 @@ typedef int (*start_failure_fn)(struct strbuf *err,
177177
* the negative signal number.
178178
*/
179179
typedef int (*task_finished_fn)(int result,
180-
struct strbuf *err,
180+
struct strbuf *out,
181181
void *pp_cb,
182182
void *pp_task_cb);
183183

0 commit comments

Comments
 (0)